keycloak: Admin console never loads
Describe the bug
I’ve just deployed keycloak and set it up behind my reverse proxy. However, the admin console refuses to load, just getting stuck saying “Loading…”.
Version
18.0.0
Expected behavior
The admin console should load fine
Actual behavior
The console remains stuck on “Loading…”.
How to Reproduce?
These may not work for anyone else, but:
- Deploy keycloak
 - For your nginx config, add the following for location “/”:
 
    proxy_set_header X-Forwarded-For $proxy_protocol_addr; # To forward the original client's IP address 
    proxy_set_header X-Forwarded-Proto $scheme; # to forward the  original protocol (HTTP or HTTPS)
    proxy_set_header Host $host; # to forward the original host requested by the client
proxy_hide_header X-Content-Type-Options;
add_header X-Content-Type-Options "" always;
# Pass other proxy headers and pass as normal
(I removed the X-Content-Type-Options header due to this bug, and I don’t know if that’s fixed.)
3. Try logging into the admin console.
Anything else?
My full nginx configuration is quite lengthy, but if you guys want me to upload that here I can do that.
About this issue
- Original URL
 - State: closed
 - Created 2 years ago
 - Comments: 41 (12 by maintainers)
 
I encounter the same issue with Keycloak 19.0.1 with no reverse proxy between my browser and Keycloak.
My issue was the
hostname=field inkeycloak.confwas not set to the same address I used to access the built-in webserver.Is this expected behavior? If for some reason the
hostname=field does need to match (albeit me seeing use cases where one wants to access the server from different hostnames), should the program not inform the user about this, instead of showing a spinning circle? 😃