keycloak-nodejs-connect icon indicating copy to clipboard operation
keycloak-nodejs-connect copied to clipboard

KEYCLOAK-5954 - Read port from x-forwarded-port if present

Open korommatyi opened this issue 5 years ago • 0 comments

As pointed out in https://github.com/keycloak/keycloak-nodejs-connect/pull/102#issuecomment-355906829 the way to make the express server specify the correct redirect URL if the server is behind a proxy is to set the x-forwarded-proto and x-forwarded-host headers. But unfortunately, the port is still obtained from the request.headers.host. With this change x-forwarded-port is honored as well, so this makes the server fully functional behind the proxy.

I'm happy to add any test or documentation if you see fit.

korommatyi avatar Jul 11 '19 16:07 korommatyi