Keycloak reverse proxy

Please help solve problem with proxying.
I am using the following scheme:
Keycloack (ver 5.0) is running in a container on Kubernetes. Web access via ingress (url:
External requests are proxied to ingress from url: (nginx)
When I get to the authorization page, I see in html tag “form”: <form id =“kc-form-login” onsubmit=“login.disabled=true; return true;” action="" instead of ""
How to configure that it uses the correct url.

I guess you are using official jboss/keycloak:latest image:

Configure the environment variable PROXY_ADDRESS_FORWARDING=true for Keycloak containers. Doc :

When running Keycloak behind a proxy, you will need to enable proxy address forwarding.

docker run -e PROXY_ADDRESS_FORWARDING=true jboss/keycloak

jangaraj, thanks for the answer.
I tried set env PROXY_ADDRESS_FORWARDING=true, and CLI /opt/jboss/keycloak/bin/ --connect \ "/subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=proxy-address-forwarding, value=true)"
but this did not help.

1 Like