36 lines
840 B
Nginx Configuration File
36 lines
840 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name rebours.studio;
|
|
|
|
root /var/www/rebours/public;
|
|
index index.html;
|
|
|
|
# HTML : jamais caché
|
|
location ~* \.html$ {
|
|
add_header Cache-Control "no-store";
|
|
}
|
|
|
|
# CSS / JS : revalidation obligatoire à chaque requête
|
|
location ~* \.(css|js)$ {
|
|
add_header Cache-Control "no-cache";
|
|
}
|
|
|
|
# Assets (images, fonts) : cache long
|
|
location ~* \.(jpg|jpeg|png|gif|webp|svg|woff2|woff|ttf)$ {
|
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
}
|
|
|
|
location = /success {
|
|
try_files /success.html =404;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /api/ {
|
|
proxy_pass http://127.0.0.1:3000;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
}
|
|
} |