fix(frontend): Fix PWA caching system, remove prompts.

This commit is contained in:
Elisiário Couto
2025-10-05 23:15:29 +01:00
parent 38fddeb281
commit 1cd63731a3
7 changed files with 62 additions and 304 deletions

View File

@@ -1,4 +1,9 @@
server {
types {
application/manifest+json webmanifest;
}
listen 80;
server_name localhost;
root /usr/share/nginx/html;
@@ -13,6 +18,9 @@ server {
# Handle client-side routing
location / {
autoindex off;
expires off;
add_header Cache-Control "public, max-age=0, s-maxage=0, must-revalidate" always;
try_files $uri $uri/ /index.html;
}
@@ -26,7 +34,7 @@ server {
}
# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
location ~* \.(css|png|jpg|jpeg|gif|ico|svg)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}