Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Update Docker static asset caching configuration
Leendert de Borst85642eab64e0
diff --git a/apps/server/AliasVault.Client/nginx.conf b/apps/server/AliasVault.Client/nginx.confindex d177ae4d6..bc4c4ca10 100644--- a/apps/server/AliasVault.Client/nginx.conf+++ b/apps/server/AliasVault.Client/nginx.conf@@ -24,6 +24,26 @@ http {listen 3000;server_name localhost;+ # Cache static assets with versioning (CSS, JS, fonts, images)+ # These files have cache-busting query parameters, so they can be cached aggressively+ location ~* \.(css|js|mjs|woff|woff2|ttf|eot|png|jpg|jpeg|gif|ico|svg|webp)$ {+ root /usr/share/nginx/html;+ expires 1y;+ add_header Cache-Control "public, immutable";+ try_files $uri =404;+ }++ # Never cache index.html and appsettings.json+ # These files must always be fresh to ensure users get the latest version+ location ~* ^/(index\.html|appsettings\.json)$ {+ root /usr/share/nginx/html;+ expires -1;+ add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";+ add_header Pragma "no-cache";+ try_files $uri =404;+ }++ # Default location for all other fileslocation / {root /usr/share/nginx/html;try_files $uri $uri/ /index.html =404;diff --git a/dockerfiles/all-in-one/config/nginx-443.conf b/dockerfiles/all-in-one/config/nginx-443.confindex 3a6da293d..91de62927 100644--- a/dockerfiles/all-in-one/config/nginx-443.conf+++ b/dockerfiles/all-in-one/config/nginx-443.conf@@ -118,6 +118,12 @@ http {proxy_set_header X-Forwarded-Proto $scheme;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;+ # Preserve cache headers from upstream client nginx+ proxy_hide_header Cache-Control;+ proxy_hide_header Pragma;+ proxy_hide_header Expires;+ add_header Cache-Control $upstream_http_cache_control;+# Show status page if client is downproxy_intercept_errors on;error_page 502 503 504 =503 /status.html;diff --git a/dockerfiles/all-in-one/config/nginx-80-443.conf b/dockerfiles/all-in-one/config/nginx-80-443.confindex 8e287a18c..1059c295b 100644--- a/dockerfiles/all-in-one/config/nginx-80-443.conf+++ b/dockerfiles/all-in-one/config/nginx-80-443.conf@@ -105,6 +105,12 @@ http {proxy_set_header X-Forwarded-Proto $scheme;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;+ # Preserve cache headers from upstream client nginx+ proxy_hide_header Cache-Control;+ proxy_hide_header Pragma;+ proxy_hide_header Expires;+ add_header Cache-Control $upstream_http_cache_control;+# Show status page if client is downproxy_intercept_errors on;error_page 502 503 504 =503 /status.html;@@ -180,6 +186,12 @@ http {proxy_set_header X-Forwarded-Proto $scheme;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;+ # Preserve cache headers from upstream client nginx+ proxy_hide_header Cache-Control;+ proxy_hide_header Pragma;+ proxy_hide_header Expires;+ add_header Cache-Control $upstream_http_cache_control;+# Show status page if client is downproxy_intercept_errors on;error_page 502 503 504 =503 /status.html;