fix: 修复飞书扫码登录 404 问题

1. 后端路由修正
   - 将 /login/qrcode/{id} 移出 /api/v1 路由组
   - 修正路由参数获取方式,使用参数注入而非 getRouteParam()

2. OpenResty 配置
   - 添加 /login/qrcode/ 路径代理到后端

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-02-26 10:06:27 +08:00
parent 4ca47f0d33
commit 6357e5dbdc
3 changed files with 21 additions and 3 deletions
+16
View File
@@ -28,6 +28,22 @@ server {
proxy_read_timeout 60s;
}
# 飞书登录回调代理
location /login/qrcode/ {
proxy_pass http://127.0.0.1:8787/login/qrcode/;
proxy_http_version 1.1;
# 传递真实IP
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_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
# 健康检查端点
location /health {
access_log off;