From e5b5b8ff831d05f3e00cb96b75fe29703caad743 Mon Sep 17 00:00:00 2001 From: fcarraUniSa Date: Tue, 17 Feb 2026 00:21:26 +0100 Subject: [PATCH] Update nginx.conf --- nginx.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nginx.conf b/nginx.conf index f54f59e..3092f3d 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,13 +1,19 @@ server { listen 80; + + # Compressione Gzip per performance + gzip on; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; location / { root /usr/share/nginx/html; index index.html index.htm; + # Importante per React Router: se il file non esiste, serve index.html try_files $uri $uri/ /index.html; } location /api { + # 'backend' รจ il nome del servizio nel docker-compose proxy_pass http://backend:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade;