From 925cb99fafa4f457e799a871bf8878c841c1918d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 4 Apr 2024 15:52:19 +0200 Subject: Log content encoding in all cases --- src/app.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app.ts b/src/app.ts index 101d2bc..0fc836e 100644 --- a/src/app.ts +++ b/src/app.ts @@ -176,6 +176,7 @@ export const server = { metrics.requests.inc({ method: request.method, hostname, + content_encoding: contentEncoding, path: pathname, status_code: (status = 304), }); @@ -220,6 +221,7 @@ export const server = { method: request.method, hostname, path: pathname, + content_encoding: contentEncoding, status_code: (status = 302), }); return new Response("", { @@ -232,6 +234,7 @@ export const server = { method: request.method, hostname, path: newpath, + content_encoding: contentEncoding, status_code: (status = 302), }); return new Response("", { @@ -244,7 +247,7 @@ export const server = { hostname, path: pathname, status_code: (status = 404), - content_encoding: "identity", + content_encoding: contentEncoding, }); transaction.setHttpStatus(status); const notfound = files.get("/404.html"); -- cgit 1.4.1