keycloak-nodejs-connect
keycloak-nodejs-connect copied to clipboard
KEYCLOAK-5954 - Read port from x-forwarded-port if present
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.