about summary refs log tree commit diff stats
path: root/src/app.ts
diff options
context:
space:
mode:
authorAlan Pearce2024-04-04 15:52:19 +0200
committerAlan Pearce2024-04-04 15:52:19 +0200
commit925cb99fafa4f457e799a871bf8878c841c1918d (patch)
treeb97ad77876e9569e68332523c3851e9ee1d803d2 /src/app.ts
parent82ce3eb70d5346f6e0244a0126eff7f80754a069 (diff)
downloadwebsite-925cb99fafa4f457e799a871bf8878c841c1918d.tar.lz
website-925cb99fafa4f457e799a871bf8878c841c1918d.tar.zst
website-925cb99fafa4f457e799a871bf8878c841c1918d.zip
Log content encoding in all cases
Diffstat (limited to 'src/app.ts')
-rw-r--r--src/app.ts5
1 files changed, 4 insertions, 1 deletions
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");