From 8379387d302ae61cee74dfbb8086e4f6ee097740 Mon Sep 17 00:00:00 2001 From: Didictateur Date: Mon, 23 Feb 2026 13:46:03 +0100 Subject: [PATCH] change nginx config --- nginx.conf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nginx.conf b/nginx.conf index 9e1911f..e60bfdc 100644 --- a/nginx.conf +++ b/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; } } }