default.nginx.conf 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. gzip_static on;
  2. gzip on;
  3. gzip_min_length 50000;
  4. gzip_proxied expired no-cache no-store private auth;
  5. gzip_types
  6. application/atom+xml
  7. application/geo+json
  8. application/javascript
  9. application/x-javascript
  10. application/json
  11. application/ld+json
  12. application/manifest+json
  13. application/rdf+xml
  14. application/rss+xml
  15. application/vnd.ms-fontobject
  16. application/wasm
  17. application/x-web-app-manifest+json
  18. application/xhtml+xml
  19. application/xml
  20. font/eot
  21. font/otf
  22. font/ttf
  23. image/bmp
  24. image/svg+xml
  25. text/cache-manifest
  26. text/calendar
  27. text/css
  28. text/javascript
  29. text/markdown
  30. text/plain
  31. text/xml
  32. text/x-component
  33. text/x-cross-domain-policy;
  34. server {
  35. server_name _;
  36. root /var/www;
  37. index index.html;
  38. large_client_header_buffers 4 32k;
  39. add_header Cache-Control "must-revalidate";
  40. error_page 504 /custom_504.html;
  41. location = /custom_504.html {
  42. internal;
  43. }
  44. add_header Cache-Control "max-age=300";
  45. location / {
  46. try_files $uri $uri/ /index.html;
  47. }
  48. add_header ETag "1.96.0";
  49. listen 9090;
  50. listen [::]:9090;
  51. resolver kube-dns.kube-system.svc.cluster.local valid=5s;
  52. location /healthz {
  53. return 200 'OK';
  54. }
  55. location /allocation {
  56. proxy_connect_timeout 180;
  57. proxy_send_timeout 180;
  58. proxy_read_timeout 180;
  59. set $server http://opencost.opencost.svc.cluster.local.:9003;
  60. proxy_pass $server;
  61. proxy_redirect off;
  62. proxy_http_version 1.1;
  63. proxy_set_header Connection "";
  64. proxy_set_header X-Real-IP $remote_addr;
  65. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  66. }
  67. }