feat(logging): add debug logs for key validation and request handling
Some checks failed
Auto Changelog & Release / detect-version-change (push) Successful in 5s
Auto Changelog & Release / release (push) Has been skipped
Auto Changelog & Release / changelog-only (push) Successful in 8s
Build and upload Docker nightly image / build-and-push (push) Has been cancelled
Some checks failed
Auto Changelog & Release / detect-version-change (push) Successful in 5s
Auto Changelog & Release / release (push) Has been skipped
Auto Changelog & Release / changelog-only (push) Successful in 8s
Build and upload Docker nightly image / build-and-push (push) Has been cancelled
- Add debug logs for invalid and valid API key masking - Log unsupported content types in middleware - Log forwarded request URLs and response statuses from LT server
This commit is contained in:
@@ -37,12 +37,16 @@ export const handler: Handler = async (ctx) => {
|
||||
const headers = new Headers(ctx.req.headers);
|
||||
headers.delete('content-length');
|
||||
|
||||
console.debug('Forwarding request to:', proxyUrl.toString());
|
||||
|
||||
const forwarded = await fetch(proxyUrl.toString(), {
|
||||
method: ctx.req.method,
|
||||
headers,
|
||||
body,
|
||||
});
|
||||
|
||||
console.debug('Received response from LT server:', forwarded.status);
|
||||
|
||||
const respHeaders = new Headers(forwarded.headers);
|
||||
return new Response(forwarded.body, {
|
||||
status: forwarded.status,
|
||||
|
Reference in New Issue
Block a user