'Keycloak Invalid parameter: redirect_uri because of the 443 port number
I have a Keyclock integration deployed on the container in front of which Apache is configured to proxy traffic.
Apache is configure with mod_proxy like below
RewriteEngine On
ProxyRequests Off
ProxyPreserveHost On
ProxyVia On
# Keycloak integration (port 8089 is mapped to container port 8080)
ProxyPass /auth/ http://10.10.20.11:8089/auth/
ProxyPassReverse /auth/ http://10.10.20.11:8089/auth/
# Proxy to application
ProxyPass / http://10.10.20.11:8080/
ProxyPassReverse / http://10.10.20.11:8080/
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
My problem with this configuration it that to the request_uri the HOST with Port is passed like below:
htpps://example.com/auth/..../client_ui=test&redirect_uri=https%3A%2F%2Fexample.com%3A443%2FloginKeycloak.do
When I will use ajp instead of the http then I don't have this problem as the port number is not passed in the response.
Do you have some ideas how to solve this problem?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
