Replies: 1 comment
-
|
The warning is telling you that you have a misconfiguration. You are mixing hostname v2 and v1 options. The v1 options are not being used. Nor is PROXY_ADDRESS_FORWARDING used by the community image. In particular KC_HOSTNAME_URL is not being used. Since you have KC_HOSTNAME_STRICT=false and KC_PROXY_HEADERS=xforwarded you should expect that something like |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
�� Keycloak 26.2.5 generates frontend resource URLs without port number when behind nginx reverse proxy with non-standard HTTPS port
Problem Description
Keycloak 26.2.5 is generating static resource URLs without the port number when accessed through an nginx reverse proxy on a non-standard HTTPS port (8080), causing Mixed Content errors and blank admin console pages.
Key Issue: While main application URLs work correctly with the port, static resource URLs (CSS, JS, fonts) are generated without the port number.
Environment
26.2.5(docker.io/bitnami/keycloak:26.2.5-debian-12-r3)https://172.31.112.142:8080(IP address with port 8080)Expected Behavior
When accessing
https://172.31.112.142:8080/, Keycloak should:https://172.31.112.142:8080/resources/...Actual Behavior
✅ Working URLs (correctly include port :8080):
https://172.31.112.142:8080/→ workshttps://172.31.112.142:8080/admin/→ workshttps://172.31.112.142:8080/admin/master/console/→ works❌ Failing URLs (missing port :8080):
https://172.31.112.142/resources/60tl/admin/keycloak.v2/assets/main-BF...→ ERR_ADDRESS_UNREACHABLEhttps://172.31.112.142/resources/master/admin/en→ ERR_ADDRESS_UNREACHABLENetwork Trace Evidence
Browser network tab shows:
:8080port ✅:8080port ❌Configuration
Keycloak Environment Variables:
nginx Ingress Configuration:
Proxy Headers ConfigMap:
Reproduction Steps
KC_HOSTNAME_URL=https://172.31.112.142:8080PROXY_ADDRESS_FORWARDING=trueand proper proxy headershttps://172.31.112.142:8080/:8080, but resource URLs fail without portTechnical Analysis
KC_HOSTNAME_URLcurl Test Evidence
curl -k https://172.31.112.142:8080/ -I # Returns: location: https://172.31.112.142/admin/ (missing :8080)Keycloak Log Warning
Question
Is there a separate configuration for static resource URL generation in Keycloak 26.2.5? The
KC_HOSTNAME_URLsetting appears to work for main application URLs but is ignored for frontend resource generation.Workaround attempts tried:
PROXY_ADDRESS_FORWARDING=trueX-Forwarded-*headersKC_HOSTNAME_URLwith full URL including portKC_PROXY=edgeImpact
This issue makes Keycloak unusable in environments requiring non-standard HTTPS ports when accessed via IP addresses, which is common in:
Requested Solution
Please provide guidance on how to ensure ALL URLs (including static resources) generated by Keycloak include the port number when
KC_HOSTNAME_URLcontains a port specification.Beta Was this translation helpful? Give feedback.
All reactions