From 1f276ee3da8f73478f475cc3830c26c504b92a08 Mon Sep 17 00:00:00 2001 From: Tine Date: Tue, 6 Feb 2024 13:41:32 +0100 Subject: [PATCH] feat(analytics): caching --- nginx.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index 341fd02..28ee3f0 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,3 +1,5 @@ +proxy_cache_path /var/run/nginx-cache/jscache levels=1:2 keys_zone=jscache:100m inactive=30d use_temp_path=off max_size=100m; + server { listen 80 default_server; server_name _; @@ -18,7 +20,6 @@ server { # https://plausible.io/docs/proxy/guides/nginx set $plausible_script_url https://plausible.io/js/script.js; # Change this if you use a different variant of the script set $plausible_event_url https://plausible.io/api/event; - proxy_cache_path /var/run/nginx-cache/jscache levels=1:2 keys_zone=jscache:100m inactive=30d use_temp_path=off max_size=100m; location = /js/script.js { proxy_pass $plausible_script_url; proxy_set_header Host plausible.io;