nginx.conf.template 603 B

1234567891011121314151617181920212223
  1. server {
  2. listen 80;
  3. root /usr/share/nginx/html;
  4. index index.html;
  5. location / {
  6. try_files $uri $uri/ /index.html;
  7. }
  8. # SSO 回调页面由前端 SPA 处理,不代理到后端
  9. location /auth/callback {
  10. try_files $uri /index.html;
  11. }
  12. location ~ ^/(v1|v2|auth|version|proxy|update|cli|grafana) {
  13. proxy_pass ${BACKEND_URL};
  14. proxy_set_header Host $host;
  15. proxy_set_header X-Real-IP $remote_addr;
  16. proxy_http_version 1.1;
  17. proxy_set_header Upgrade $http_upgrade;
  18. proxy_set_header Connection "upgrade";
  19. }
  20. }