2021-12-20 20:05:05 +00:00
|
|
|
server {
|
|
|
|
listen 8080;
|
|
|
|
server_name localhost;
|
|
|
|
|
2023-01-12 16:20:37 +00:00
|
|
|
root /app;
|
|
|
|
|
2021-12-20 20:05:05 +00:00
|
|
|
location / {
|
2023-01-12 16:20:37 +00:00
|
|
|
# disable cache entriely by default (apart from Etag which is accurate enough)
|
|
|
|
add_header Cache-Control 'private no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
|
|
|
if_modified_since off;
|
|
|
|
expires off;
|
|
|
|
# also turn off last-modified since they are just the timestamps of the file in the docker image
|
|
|
|
# and may or may not bear any resemblance to when the resource changed
|
|
|
|
add_header Last-Modified "";
|
|
|
|
|
2021-12-20 20:05:05 +00:00
|
|
|
try_files $uri /$uri /index.html;
|
|
|
|
}
|
2023-01-12 16:20:37 +00:00
|
|
|
|
|
|
|
# assets can be cached because they have hashed filenames
|
|
|
|
location /assets {
|
|
|
|
expires 1w;
|
|
|
|
add_header Cache-Control "public, no-transform";
|
|
|
|
}
|
2021-12-20 20:05:05 +00:00
|
|
|
}
|
|
|
|
|