-
Notifications
You must be signed in to change notification settings - Fork 350
Unable to set the request Host header #259
Comments
Hi I've also have kinda the same problem. I have 2 containers in a Kubernetes POD. One is mapped to PORT 8080 (the actual application) and another container with the keycloak-proxy thing. The thing is if I try to access the internal container with trailing slash ('/'), i.e. <PUBLIC_URL>/applicationContext/, then after the login on keycloak side I am being sent back to the <PUBLIC_URL>/applicationContext/ and everything works. BUT, if I go to the URL without the trailing slash, i.e. <PUBLIC_URL>/applicationContext, then I will be redirected back from Keycloak after a successful login to http://localhost:8080/applicationContext which is not good. How can I solve this? |
@songokudbz try to set config |
@jangaraj it did not do the trick. I've added the redirection-url but it still sends me to localhost. My upstream url looks like this: |
@songokudbz: No, you don't need to update |
As of 2.1.0, you can now set the Host: header in your |
Closing the issue as it was fixed in v2.1.0 |
Hi,
In our setup the keycloak proxy's upstream-url is set to the internal URL of a web application that is not accessible from the internet (e.g. http://webapp.internal:6543/).
We use an Amazon Load Balancer that forwards requests to the keycloak proxy. It is accessed publicly like https://protected-webapp.example.com.
Our issue is thet the webapp relies on the Host header from the http request for creating URLs, so now we are getting the internal hostname (webapp.internal:6543) in the browser, which of course does not work from the internet.
I see that the Host header is set by the keycloak proxy to the value of upstream-url.
I tried to set the Host header manually like this:
headers:
Host: protected-webapp.example.com
But still it gets to the webapp with the upstream-url value.
Is there any way to set the Host header to a custom value?
Thanks!
The text was updated successfully, but these errors were encountered: