IdentityServer4 icon indicating copy to clipboard operation
IdentityServer4 copied to clipboard

IS4 Login redirect do not work behind HAProxy

Open sunch1ld opened this issue 4 years ago • 1 comments

Hi I am using Identity Server 4 in production environement behind HAProxy on PFSense when I try https://myhostname.com/.well-known/openid-configuration works, but when I use the redirect login something like http://myhostname.com/connect/authorize?client_id=js&redirect_uri=https%3A%2F%2Fmyhostname.com%2Fcallback.html&response_type=code&scope=openid%20profile%20manservice%20offline_access&state=c4b29402bb324d0da1e71fae3a8af3f3&code_challenge=F51DRa49-Mv0-yywL3RGnFrjH6stBzi4M4qJrtQej30&code_challenge_method=S256&ui_locales=en-GB. The redirect do not works and the page is not displayed and go in timeout, why? What are the settings to set on haproxy and identity server 4? Thanks

sunch1ld avatar Jun 15 '21 07:06 sunch1ld

Hi, this is related to ASPNET.Core and how we deploy (scheme: https vs http). You can check this article for further information https://devblogs.microsoft.com/aspnet/forwarded-headers-middleware-updates-in-net-core-3-0-preview-6/

If you want to troubleshoot the deployment, can use this EchoServiceApi tool https://hub.docker.com/r/netlah/echo-service-api https://github.com/NetLah/EchoServiceApi

thohng avatar Jun 18 '21 08:06 thohng