From 8b9fc9487433c1cc9fa21d37e5dd943bf8c3de94 Mon Sep 17 00:00:00 2001 From: cabbagec Date: Wed, 18 Mar 2026 04:33:57 +0800 Subject: [PATCH] fix: add cache rules --- nginx.conf | 3 +++ static/index.html | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nginx.conf b/nginx.conf index 765e9e2..50dc6c2 100644 --- a/nginx.conf +++ b/nginx.conf @@ -21,9 +21,12 @@ location = /s { } # --- Serve frontend index.html at /s/ --- +# no-store prevents Cloudflare and browsers from caching the HTML entry point, +# so updated ?v= cache-busters on CSS/JS are always picked up immediately. location = /s/ { root /root/repo/urlshortener/static; try_files /index.html =404; + add_header Cache-Control "no-store"; } # --- Serve frontend static assets (CSS, JS, etc.) --- diff --git a/static/index.html b/static/index.html index 924e144..2cec6ea 100644 --- a/static/index.html +++ b/static/index.html @@ -7,7 +7,7 @@ Short ยท URL Shortener - + @@ -58,7 +58,7 @@
- +