chore: build
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
server {
|
||||
listen 8080;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Liveness/readiness probe target -- doesn't touch the filesystem or
|
||||
# fall through to the SPA fallback below.
|
||||
location = /healthz {
|
||||
access_log off;
|
||||
return 200 "ok\n";
|
||||
add_header Content-Type text/plain;
|
||||
}
|
||||
|
||||
# Hashed build assets (Vite fingerprints these) can be cached forever.
|
||||
location /assets/ {
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# BrowserRouter (see src/App.tsx) needs every unknown path to fall back
|
||||
# to index.html so client-side routing can take over.
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
add_header Cache-Control "no-cache";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user