<div dir="ltr">Take a look at <a href="http://keycloak.github.io/docs/userguide/keycloak-server/html/server-installation.html#proxy-address-forwarding">http://keycloak.github.io/docs/userguide/keycloak-server/html/server-installation.html#proxy-address-forwarding</a>. proxy-address-forwarding=true does set <span style="font-size:12.8px">HttpServletRequest#</span><span style="font-size:12.8px">getRequestURL(), but only if http is used. If you're using ajp then you need to use ProxyPeerAddressHandler.</span></div><div class="gmail_extra"><br><div class="gmail_quote">On 22 May 2016 at 10:10, Christian Bauer <span dir="ltr"><<a href="mailto:christian.bauer@gmail.com" target="_blank">christian.bauer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A workaround/solution is to set the Host header on the proxy.<br>
<br>
This is equivalent to setting ProxyPreserveHost On if you'd be using Apache mod_proxy. It requires some ugly hacks however customizing this header with my Resteasy/ApacheHttpClient proxy.<br>
<div class="HOEnZb"><div class="h5"><br>
> On 22.05.2016, at 00:18, Christian Bauer <<a href="mailto:christian.bauer@gmail.com">christian.bauer@gmail.com</a>> wrote:<br>
><br>
> Already done. I don't think that affects HttpServletRequest#getRequestURL(), which is what Resteasy is using to populate UriInfo#getBaseUri()?<br>
><br>
>> set the proxy-address-forwarding="true" for the http-listener.<br>
>><br>
>>><br>
>>> The proxy makes a call to Keycloak with a Bearer token and the correct X-Forwarded-* headers. Keycloak/Wildfly is configured with proxy-address-forwarding=true.<br>
><br>
><br>
> _______________________________________________<br>
> keycloak-user mailing list<br>
> <a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
<br>
<br>
_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
</div></div></blockquote></div><br></div>