Identityserver4 OpenID-配置省略运行nginx反向代理的主机端口 [英] Identityserver4 openid-configuration omits host port running nginx reverse proxy

查看:18
本文介绍了Identityserver4 OpenID-配置省略运行nginx反向代理的主机端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows中使用docker在Nginx反向代理后面设置身份服务器4。它在myhost:5000上运行正常。但在访问http://myhost:5000/.well-known/openid-configuration时获得以下响应 缺少但在开发环境中工作的端口号的位置(即:http://localhost:5000)

{
"issuer":"http://myhost",
"jwks_uri":"http://myhost/.well-known/openid-configuration/jwks",
"authorization_endpoint":"http://myhost/connect/authorize",
"token_endpoint":"http://myhost/connect/token",
"userinfo_endpoint":"http://myhost/connect/userinfo",
"end_session_endpoint":"http://myhost/connect/endsession",
"check_session_iframe":"http://myhost/connect/checksession",
"revocation_endpoint":"http://myhost/connect/revocation",
"introspection_endpoint":"http://myhost/connect/introspect",
"frontchannel_logout_supported":true,
"frontchannel_logout_session_supported":true,
"backchannel_logout_supported":true,
"backchannel_logout_session_supported":true,    
}

我尝试了以下身份服务器选项IssuerUriPublicOrigin,但响应仍然相同。

是否有其他解决方案来获取端口号响应?

谢谢

推荐答案

我也正面临这个问题。
您需要在nginx的主机标头中添加端口。
proxy_set_header Host $host:$server_port;

Original Source

这篇关于Identityserver4 OpenID-配置省略运行nginx反向代理的主机端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆