mirror of
https://github.com/warmbly/warmbly.git
synced 2026-10-13 16:02:42 +00:00
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
36 lines
1.1 KiB
Nginx Configuration File
36 lines
1.1 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# SPA history fallback: unknown paths serve the app shell so client-side
|
|
# routing works on hard reloads and deep links.
|
|
location / {
|
|
include /etc/nginx/warmbly-security-headers.conf;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# Never cache the shell or the runtime config, so a redeploy or an env
|
|
# change is picked up on the next load. The hashed assets they point to are
|
|
# cached immutably below.
|
|
location = /index.html {
|
|
include /etc/nginx/warmbly-security-headers.conf;
|
|
add_header Cache-Control "no-store" always;
|
|
}
|
|
location = /config.js {
|
|
include /etc/nginx/warmbly-security-headers.conf;
|
|
add_header Cache-Control "no-store" always;
|
|
}
|
|
|
|
location /assets/ {
|
|
include /etc/nginx/warmbly-security-headers.conf;
|
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
}
|
|
|
|
location = /mail-preview.html {
|
|
include /etc/nginx/warmbly-mail-preview-headers.conf;
|
|
add_header Cache-Control "no-store" always;
|
|
}
|
|
}
|