diff --git a/compose/nginx/nginx.conf b/compose/nginx/nginx.conf index 40af99177..de8aa513a 100644 --- a/compose/nginx/nginx.conf +++ b/compose/nginx/nginx.conf @@ -79,7 +79,12 @@ http { server_name _; root /compose/neurosynth-frontend/dist; + location /assets/ { + add_header Cache-Control "public, max-age=31536000, immutable" always; + } + location /static/ { + add_header Cache-Control "public, max-age=31536000, immutable" always; } location /api { @@ -93,6 +98,7 @@ http { } location / { + add_header Cache-Control "no-store, must-revalidate" always; try_files $uri /index.html; } diff --git a/compose/nginx/nginx.dev.conf b/compose/nginx/nginx.dev.conf index 0d355a449..5731ac30c 100644 --- a/compose/nginx/nginx.dev.conf +++ b/compose/nginx/nginx.dev.conf @@ -80,7 +80,12 @@ http { server_name _; root /compose/neurosynth-frontend/build; + location /assets/ { + add_header Cache-Control "public, max-age=31536000, immutable" always; + } + location /static/ { + add_header Cache-Control "public, max-age=31536000, immutable" always; } location /api { @@ -94,6 +99,7 @@ http { } location / { + add_header Cache-Control "no-store, must-revalidate" always; try_files $uri /index.html; }