first commit
This commit is contained in:
@@ -3,6 +3,11 @@ upstream backend_upstream {
|
||||
keepalive 16;
|
||||
}
|
||||
|
||||
map $uri $static_file {
|
||||
~*\.(?:css|js|mjs|png|jpg|jpeg|gif|svg|ico|webp|woff2?)$ 1;
|
||||
default 0;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
@@ -46,8 +51,7 @@ server {
|
||||
}
|
||||
|
||||
location = /index.html {
|
||||
expires -1;
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate" always;
|
||||
add_header Cache-Control "no-store, no-cache" always;
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
@@ -73,6 +77,12 @@ server {
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
proxy_pass http://web:80/;
|
||||
|
||||
if ($static_file) {
|
||||
add_header Cache-Control "public, max-age=31536000, immutable" always;
|
||||
}
|
||||
|
||||
add_header Cache-Control "no-store, no-cache" always;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user