| 12345678910111213141516171819202122232425 |
- server {
- listen 80;
- root /usr/share/nginx/html;
- index index.html;
- location / {
- try_files $uri $uri/ /index.html;
- }
- # SSO 回调页面:服务端重定向到 hash 路由格式
- # SSO平台不支持带#的redirect_uri,所以需要nginx将 /auth/callback?code=xxx
- # 重定向到 /#/auth/callback?code=xxx
- location = /auth/callback {
- return 302 /#/auth/callback$is_args$args;
- }
- location ~ ^/(v1|v2|auth|version|proxy|update|cli|grafana) {
- proxy_pass ${BACKEND_URL};
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- }
- }
|