change nginx config
This commit is contained in:
parent
f0a2d68b99
commit
8379387d30
1 changed files with 7 additions and 7 deletions
14
nginx.conf
14
nginx.conf
|
|
@ -28,9 +28,10 @@ http {
|
|||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Servir les fichiers statiques
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
# Cache pour les assets
|
||||
location ~* \.(css|js|svg|png|jpg|jpeg|gif|ico)$ {
|
||||
expires 1d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# Proxy vers le backend Flask
|
||||
|
|
@ -42,10 +43,9 @@ http {
|
|||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
# Cache pour les assets
|
||||
location ~* \.(css|js|svg|png|jpg|jpeg|gif|ico)$ {
|
||||
expires 1d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
# Servir les fichiers statiques (à la fin, après les autres locations)
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue