From 1bfec397b5fba77a00f25de75468431d3ab57171 Mon Sep 17 00:00:00 2001 From: Drew Haven Date: Tue, 17 Jun 2025 16:05:21 -0700 Subject: [PATCH] [goatcounter] Adds back the rewrite for count.js --- system/hosts/mcp/containers/goatcounter.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/system/hosts/mcp/containers/goatcounter.nix b/system/hosts/mcp/containers/goatcounter.nix index d300169..af90eac 100644 --- a/system/hosts/mcp/containers/goatcounter.nix +++ b/system/hosts/mcp/containers/goatcounter.nix @@ -12,13 +12,13 @@ in volumes = [ "goatcounter-data:/home/goatcounter/goatcounter-data" ]; - # Sends www.terakoda.com/analytics to goatcounter and strips the /analytics prefix. - # extraLabels = { - # "traefik.http.middlewares.strip-analytics.stripprefix.prefixes" = "/analytics"; - # "traefik.http.routers.www-terakoda-com-goatcounter.middlewares" = "strip-analytics"; - # "traefik.http.routers.www-terakoda-com-goatcounter.rule" = - # "(PathPrefix(`/analytics`) || PathPrefix(`/count`) || Path(`/count`)) && ${hostRule "www" terakoda}"; - # "traefik.http.routers.www-terakoda-com-goatcounter.service" = "goatcounter"; - # }; + extraLabels = { + # "traefik.http.middlewares.strip-analytics.stripprefix.prefixes" = "/analytics"; + # "traefik.http.routers.www-terakoda-com-goatcounter.middlewares" = "strip-analytics"; + # Host the script on www.terakoda.com so that it is easy to fetch + "traefik.http.routers.www-terakoda-com-goatcounter.rule" = + "PathPrefix(`/count`) && ${hostRule "www" terakoda}"; + "traefik.http.routers.www-terakoda-com-goatcounter.service" = "goatcounter"; + }; }; }