nginx.conf (778B)
1 server { 2 listen 41737; 3 server_name _; 4 root /usr/share/nginx/html; 5 index index.html; 6 7 gzip on; 8 gzip_types text/plain text/css application/javascript application/json image/svg+xml; 9 gzip_min_length 256; 10 11 location /api/ { 12 proxy_pass http://backend:41738; 13 proxy_http_version 1.1; 14 proxy_set_header Host $host; 15 proxy_set_header X-Real-IP $remote_addr; 16 add_header X-Robots-Tag "noindex" always; 17 } 18 19 location = /index.html { 20 add_header Cache-Control "no-cache"; 21 try_files $uri =404; 22 } 23 24 location /assets/ { 25 expires 1y; 26 add_header Cache-Control "public, immutable"; 27 try_files $uri =404; 28 } 29 30 location / { 31 try_files $uri $uri/ /index.html; 32 } 33 }