We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Describe the bug 在 Nginx UI 2.1.0 版本中,通过 Nginx 反向代理添加路径后缀(如 /nginx/)后,登录功能报“服务器异常”,而直接访问后端端口(9000)或回退至 2.0.2 版本均正常。
To Reproduce Steps to reproduce the behavior:
location /nginx/ { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_pass http://127.0.0.1:9000/; # 注意末尾斜杠 }
Expected behavior 通过代理路径 /nginx/ 应能正常登录,功能与直接访问 127.0.0.1:9000 或 2.0.2 版本一致 理路径下的静态资源(JS/CSS)和 API 请求应正确加载,无会话丢失问题 或者在docker部署的时候,增加配置文件。支持/nginx前缀配置(域名和证书都需要节省,不得已采用这种后缀域名)
Info (please complete the following information):
Additional context 问题根源分析: 1.Cookie 路径不匹配 2.静态资源路径错误: 前端资源(如 JS/CSS)可能使用绝对路径(如 /static/xxx.js),代理后路径变为 /nginx/static/xxx.js,但资源实际位于后端根路径,导致 404 错误。 3.API 请求路径错误: 登录请求可能发送至 /api/#,但代理后路径应为 /nginx/api/#,后端路由不匹配。 临时解决方案: 回退版本:使用 2.0.2 版本可正常工作。
修复建议: 1.动态路径适配: 后端应根据 X-Forwarded-Prefix 头自动调整 Cookie 路径和 API 路由前缀(需 Nginx 配置 proxy_set_header X-Forwarded-Prefix /nginx/;)。 2.前端资源路径兼容 3.新增支持使用WEB_CONTEXT='/nginx'之类的docker环境变量配置
The text was updated successfully, but these errors were encountered:
刚刚,已经修复
Sorry, something went wrong.
稍后将会发布 v2.1.1
看到了。真快
No branches or pull requests
Describe the bug
在 Nginx UI 2.1.0 版本中,通过 Nginx 反向代理添加路径后缀(如 /nginx/)后,登录功能报“服务器异常”,而直接访问后端端口(9000)或回退至 2.0.2 版本均正常。
To Reproduce
Steps to reproduce the behavior:
Expected behavior
通过代理路径 /nginx/ 应能正常登录,功能与直接访问 127.0.0.1:9000 或 2.0.2 版本一致
理路径下的静态资源(JS/CSS)和 API 请求应正确加载,无会话丢失问题
或者在docker部署的时候,增加配置文件。支持/nginx前缀配置(域名和证书都需要节省,不得已采用这种后缀域名)
Info (please complete the following information):
Additional context
问题根源分析:
1.Cookie 路径不匹配
2.静态资源路径错误:
前端资源(如 JS/CSS)可能使用绝对路径(如 /static/xxx.js),代理后路径变为 /nginx/static/xxx.js,但资源实际位于后端根路径,导致 404 错误。
3.API 请求路径错误:
登录请求可能发送至 /api/#,但代理后路径应为 /nginx/api/#,后端路由不匹配。
临时解决方案:
回退版本:使用 2.0.2 版本可正常工作。
修复建议:
1.动态路径适配:
后端应根据 X-Forwarded-Prefix 头自动调整 Cookie 路径和 API 路由前缀(需 Nginx 配置 proxy_set_header X-Forwarded-Prefix /nginx/;)。
2.前端资源路径兼容
3.新增支持使用WEB_CONTEXT='/nginx'之类的docker环境变量配置
The text was updated successfully, but these errors were encountered: