Prechádzať zdrojové kódy

route GoatCounter count requests for each domain

Danilo Fragoso 12 hodín pred
rodič
commit
2ba3b1aa1c
1 zmenil súbory, kde vykonal 21 pridanie a 3 odobranie
  1. 21 3
      deploy/Caddyfile

+ 21 - 3
deploy/Caddyfile

@@ -1,6 +1,9 @@
 app.database.pizza {
 	header X-Robots-Tag "noindex, nofollow"
 
+	handle /count* {
+		reverse_proxy 127.0.0.1:3002
+	}
 	handle /api/* {
 		reverse_proxy localhost:8081
 	}
@@ -29,7 +32,12 @@ database.pizza {
 		X-Frame-Options "DENY"
 	}
 
-	file_server
+	handle /count* {
+		reverse_proxy 127.0.0.1:3002
+	}
+	handle {
+		file_server
+	}
 
 	handle_errors {
 		rewrite * /404.html
@@ -68,14 +76,24 @@ git.database.pizza {
 	tls admin@database.pizza
 	encode zstd gzip
 	header X-Content-Type-Options nosniff
-	reverse_proxy 127.0.0.1:3001
+	handle /count* {
+		reverse_proxy 127.0.0.1:3002
+	}
+	handle {
+		reverse_proxy 127.0.0.1:3001
+	}
 }
 
 tasks.database.pizza {
 	tls admin@database.pizza
 	encode zstd gzip
 	header X-Content-Type-Options nosniff
-	reverse_proxy 127.0.0.1:3456
+	handle /count* {
+		reverse_proxy 127.0.0.1:3002
+	}
+	handle {
+		reverse_proxy 127.0.0.1:3456
+	}
 }
 
 goatcounter.database.pizza {