diff --git a/docker/dinum-frontend/nginx/default.conf b/docker/dinum-frontend/nginx/default.conf index c3d26ec6..dcbedb74 100644 --- a/docker/dinum-frontend/nginx/default.conf +++ b/docker/dinum-frontend/nginx/default.conf @@ -74,6 +74,13 @@ server { location ~* ^/assets/.*\.(css|js|json|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { expires 30d; add_header Cache-Control "public, max-age=2592000"; + try_files $uri =404; + error_page 404 = @asset_missing; + } + + location @asset_missing { + add_header Cache-Control "no-store" always; + return 404; } # Serve static files diff --git a/src/frontend/default.conf b/src/frontend/default.conf index cf83d258..722875ae 100644 --- a/src/frontend/default.conf +++ b/src/frontend/default.conf @@ -14,6 +14,13 @@ server { location ~* ^/assets/.*\.(css|js|json|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { expires 30d; add_header Cache-Control "public, max-age=2592000"; + try_files $uri =404; + error_page 404 = @asset_missing; + } + + location @asset_missing { + add_header Cache-Control "no-store" always; + return 404; } # Serve static files