default.conf 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. server {
  2. listen 80 default_server;
  3. server_name _;
  4. client_max_body_size 1200m;
  5. client_body_timeout 1800s;
  6. # Report-only first: the legacy JSP pages still rely on inline scripts.
  7. # Legacy Vue's full build uses eval; keep this only in report-only until it is replaced.
  8. add_header Content-Security-Policy-Report-Only "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://answer.eol.cn https://robot.chaoxing.com https://wpa.b.qq.com; object-src 'none'; base-uri 'self'; frame-ancestors 'self';" always;
  9. add_header X-Content-Type-Options nosniff always;
  10. add_header Referrer-Policy strict-origin-when-cross-origin always;
  11. add_header X-Frame-Options SAMEORIGIN always;
  12. location ~ ^/web/subassembly/.*/backup/ {
  13. return 404;
  14. }
  15. location = /apps/workbench {
  16. return 302 /apps/workbench/;
  17. }
  18. location / {
  19. proxy_pass http://172.17.0.1:8080;
  20. proxy_set_header Host $host;
  21. proxy_set_header X-Real-IP $remote_addr;
  22. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  23. proxy_set_header X-Forwarded-Proto $scheme;
  24. proxy_set_header X-Forwarded-Port 80;
  25. proxy_set_header X-Forwarded-Host $host;
  26. proxy_connect_timeout 60s;
  27. proxy_send_timeout 1800s;
  28. proxy_read_timeout 1800s;
  29. }
  30. }