fix: scrub set-cookie, alt-svc headers
deno deploy doesn't like alt-svc or set-cookie with the wrong domain (in this case, discord.com), and emits a warning every time
This commit is contained in:
parent
7b3bf8567d
commit
e73128ddf3
5
main.ts
5
main.ts
|
@ -53,6 +53,11 @@ async function handleRequest(req: Request, connInfo: http.ConnInfo): Promise<Res
|
|||
res.headers.set(`x-webhook-filter-${key}`, value);
|
||||
}
|
||||
|
||||
// remove other headers that don't make sense here
|
||||
for (const header of ["set-cookie", "alt-svc"]) {
|
||||
res.headers.delete(header);
|
||||
}
|
||||
|
||||
// log request
|
||||
const respLen = res.headers.get("content-length") || 0;
|
||||
const addr = connInfo.remoteAddr as Deno.NetAddr;
|
||||
|
|
Loading…
Reference in New Issue