-
-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Description
按照教程docker-composer安装后部署宝塔面板反向代理:
https://lobehub.com/zh/docs/self-hosting/server-database/docker-compose#complete-reverse-proxy-configuration
部署后登录lobe会出现如下错误:
(node:30) [DEP0060] DeprecationWarning: The util._extend
API is deprecated. Please use Object.assign() instead.
(Use node --trace-deprecation ...
to show where the warning was created)
[auth][error] OperationProcessingError: "response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)
at OPE (/app/.next/server/chunks/41496.js:3960:12)
at processDiscoveryResponse (/app/.next/server/chunks/41496.js:4108:15)
at getAuthorizationUrl (/app/.next/server/chunks/41496.js:7678:26)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async signIn (/app/.next/server/chunks/41496.js:7841:56)
at async AuthInternal (/app/.next/server/chunks/41496.js:8049:24)
at async Auth (/app/.next/server/chunks/41496.js:8268:34)
at async tf.do (/app/node_modules/.pnpm/next@15.3.1_@babel+core@7.26.10_@opentelemetry+api@1.9.0_@playwright+test@1.52.0_react-dom@19_25paf3vek2gxo4yxsy44oju3wy/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:18:18835)
at async tf.handle (/app/node_modules/.pnpm/next@15.3.1_@babel+core@7.26.10_@opentelemetry+api@1.9.0_@playwright+test@1.52.0_react-dom@19_25paf3vek2gxo4yxsy44oju3wy/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:18:23727)
at async doRender (/app/node_modules/.pnpm/next@15.3.1_@babel+core@7.26.10_@opentelemetry+api@1.9.0_@playwright+test@1.52.0_react-dom@19_25paf3vek2gxo4yxsy44oju3wy/node_modules/next/dist/server/base-server.js:1513:42)
此问题已找到解决措施:
*如果已经在宝塔面板执行CasDoor/*路径的反向代理,如下面配置:
#PROXY-START/
location ^~ /
{
proxy_pass http://127.0.0.1:8000/;
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 REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
set $static_fileL3gEs8c2 0;
if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
{
set $static_fileL3gEs8c2 1;
expires 1m;
}
if ( $static_fileL3gEs8c2 = 0 )
{
add_header Cache-Control no-cache;
}
}
#PROXY-END/
只要确认你部署的https://example.com/.well-known/openid-configuration
能够正常访问,如下的配置就不要在宝塔网站面板再配置
location /.well-known/openid-configuration {
proxy_pass http://localhost:8000; # 转发到 localhost:8000
proxy_set_header Host $host; # 保留原始主机头
proxy_set_header X-Real-IP $remote_addr; # 保留客户端真实IP
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 保留转发的IP
proxy_set_header X-Forwarded-Proto $scheme; # 保留请求协议
}
``