I recently installed Keycloak as Docker container using jboss/keycloak:latest.
I’m using for all my applications a nginx server as a reverse proxy to secure my connections via ssl.
Now I can access my Keycloak instance’s main page, but when I hit the “Administration Console” button I get an Mixed Content error in my browsers console and a blank page as the result.
Configuring your proxy to generate the X-Forwarded-For and X-Forwarded-Proto HTTP headers and preserving the original Host HTTP header is beyond the scope of this guide.
I’ve also encountered the same issue when I deployed keycloak helm chart(helm-charts/tree/master/charts/keycloak) to K8S env. At the moment I’m looking for a solution.
We have nginx in front of keycloak. It may not be an issue related to Keycloak but it looks like we have to dig into keycloak documentation to find a solution.
Mixed Content: The page at ‘https:///auth/admin/master/console/’ was loaded over HTTPS, but requested an insecure script 'http:///auth/js/keycloak.js?version=qj41j’. This request has been blocked; the content must be served over HTTPS.
jquery.min.js:2 jQuery.Deferred exception: Keycloak is not defined ReferenceError: Keycloak is not defined
at HTMLDocument. (https://*****/auth/resources/qj41j/admin/keycloak/js/app.js:12:24)
at e (https://h****/auth/resources/qj41j/admin/keycloak/node_modules/jquery/dist/jquery.min.js:2:29453)
Hello i encounter exactly the same problem, i have a traefik ingress in front and this single resource is pushed using HTTP.
I think you should just move to relative resources instead of building a complete url in HTML files
I didn’t use Docker to setup my server, but I just encountered the same error, no matter what I did to my nginx configuration. At last, I noticed I overlooked a crucial part in the documentation.
Did you apply this part to your Keycloak configuration?
Having the same issue. When I look at the source, all resources links are relative (/auth/js/…), except for the one pointing to keycloak.js, which has a full url with http.
I got the same issue and here is my summary how to solve that.
As we already configured HTTP to HTTPS…Next we need to configure keycloak server to accept proxy forwarding…both docker or standalone.
so locate your standalone.xml file and find the line with server name="default-server"
the next line will be http-listener name=“default” socket-binding=“http” redirect-socket=“https” enable-http2="true"
update it with http-listener name=“default” socket-binding=“http” redirect-socket=“https” enable-http2=“true” proxy-address-forwarding="true"
@Tobb: could you please elaborate a bit on your solution?
I’m facing the “HTTP” issue while configuring Keycloak 7.0.1 up to 10.0.2 (don’t really care about the exact version, just that it works!) on K8S and behind an OCI LoadBalancer (which sends the correct headers according to their documentation:), and obviously I’ve already got the mythical “PROXY_ADDRESS_FORWARDING=true” in my Env.
So I’m trying to follow your solution now, but can’t manage to find any “frontend url” filed in Realm setting -> General for my Master Realm.