Keycloak-protected webapp behind loadbalancer - wrong redirect_uri by Keycloak


I have a webapplication that is secured by Keycloak. That webapp is accesible through a loadbalancer.
Url of the loadbalancer is

When i go to that url I get redirected to the Keycloak-server for authentication, but I get an ‘invalid parameter: invalid redirect_uri’ error message. And if I look at the querystring, then the redirect_uri uses

instead of

and the url with just http is not set as a valid redirect uri in the admin panel.
Why does Keycloak change the scheme of the url from https to http?? Is it because of the load balancer
Did I forget to configure something? If I test everything locally on localhost everything works fine, but once on our testserver (with loadbalancing) it changes the url…any help is appreciated!