Make console.log appear on every request that is not authping
This commit is contained in:
parent
9bb01c811b
commit
be64733578
|
@ -6,19 +6,22 @@ import type { HandleFetch } from "@sveltejs/kit";
|
|||
// return await resolve(event)
|
||||
// }
|
||||
|
||||
console.log("in hooks file: 1")
|
||||
export const handleFetch: HandleFetch = async ({ request, fetch }) => {
|
||||
if (!request.url.match('authping')) {
|
||||
console.log(request)
|
||||
console.log("handleFetch triggered for URL:", request.url);
|
||||
console.log("in handleFetch: 2")
|
||||
}
|
||||
if (request.url.startsWith("https://api.fin.qowevisa.click/api")) {
|
||||
request = new Request(
|
||||
request.url.replace("https://api.fin.qowevisa.click/api", "http://localhost:3000/api"),
|
||||
request
|
||||
)
|
||||
};
|
||||
if (!request.url.match('authping')) {
|
||||
console.log(request)
|
||||
console.log("in handleFetch: 3")
|
||||
}
|
||||
|
||||
return fetch(request);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user