Skip to content

Commit

Permalink
debug: show not found details
Browse files Browse the repository at this point in the history
  • Loading branch information
tolbrino committed May 29, 2024
1 parent 41463ae commit 0141a08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/client_log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export class ClientLog {
});
}

console.log("NOT FOUND 2", url.hostname, url.pathname);
return new Response("Not found", { status: 404 });
}

Expand Down
3 changes: 3 additions & 0 deletions server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export async function handleRequest(
env: Env,
ctx: ExecutionContext,
): Promise<Response> {
console.log("URL", request.url);
const url = new URL(request.url);
console.log("NEW URL", url);

// redirect to secure connections, unless on localhost (for testing)
if (url.hostname != "localhost" && url.hostname != "127.0.0.1") {
Expand Down Expand Up @@ -69,6 +71,7 @@ export async function handleRequest(
return logsObject.fetch(strippedUrl, request);
}

console.log("NOT FOUND 1", url.hostname, url.pathname, path);
return new Response("Not found", { status: 404 });
}

Expand Down

0 comments on commit 0141a08

Please sign in to comment.