server { listen 80; server_name _; root /usr/share/nginx/html; index index.html; client_max_body_size 105m; gzip on; gzip_types text/plain text/css application/json application/javascript text/xml image/svg+xml; gzip_min_length 1024; location = /index.html { add_header Cache-Control "no-store"; } location /api/ { proxy_pass http://emp-gateway:9000/api/; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 300s; } location /socket.io/ { proxy_pass http://emp-ws:3000/socket.io/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_read_timeout 300s; } location / { add_header Cache-Control "no-store"; try_files $uri $uri/ /index.html; } location ~* \.(js|css)$ { expires -1; add_header Cache-Control "no-cache, no-store, must-revalidate"; try_files $uri =404; } location ~* \.(png|jpg|jpeg|gif|ico|svg|woff2?|ttf|glb)$ { expires 30d; add_header Cache-Control "public, immutable"; try_files $uri =404; } }