diff --git a/backend/deploy/nginx-visual.loki-code.dev.conf b/backend/deploy/nginx-visual.loki-code.dev.conf index 66341f5..bd5384b 100644 --- a/backend/deploy/nginx-visual.loki-code.dev.conf +++ b/backend/deploy/nginx-visual.loki-code.dev.conf @@ -16,6 +16,14 @@ server { proxy_cookie_path /auth /api/auth; } + # Fingerprinted build output (assets/-.js/.css/...) -- the filename changes + # whenever the content does, so it's safe to cache "forever"; a stale copy is never served + # under the old URL after a deploy. + location /assets/ { + add_header Cache-Control "public, max-age=31536000, immutable" always; + try_files $uri =404; + } + location / { try_files $uri /index.html; } diff --git a/frontend/public/robots.txt b/frontend/public/robots.txt new file mode 100644 index 0000000..c2a49f4 --- /dev/null +++ b/frontend/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Allow: /