about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/app.ts b/src/app.ts
index 4765811..9735e79 100644
--- a/src/app.ts
+++ b/src/app.ts
@@ -157,8 +157,15 @@ export const server = {
         config.redirect_other_hostnames &&
         hostname !== expectedHostURL.host
       ) {
+        metrics.requests.inc({
+          method: request.method,
+          hostname,
+          content_encoding: "identity",
+          path: pathname,
+          status_code: (status = 301),
+        });
         return new Response("", {
-          status: (status = 301),
+          status,
           headers: {
             location: new URL(pathname, expectedHostURL).toString(),
           },