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;