feat(analytics): caching
All checks were successful
ci / docker (push) Successful in 4m49s

This commit is contained in:
Tine 2024-02-06 13:41:32 +01:00
parent 073e1bd2f7
commit 1f276ee3da
Signed by: mentos1386
SSH key fingerprint: SHA256:MNtTsLbihYaWF8j1fkOHfkKNlnN1JQfxEU/rBU8nCGw

View file

@ -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 { server {
listen 80 default_server; listen 80 default_server;
server_name _; server_name _;
@ -18,7 +20,6 @@ server {
# https://plausible.io/docs/proxy/guides/nginx # 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_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; 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 { location = /js/script.js {
proxy_pass $plausible_script_url; proxy_pass $plausible_script_url;
proxy_set_header Host plausible.io; proxy_set_header Host plausible.io;