<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&#39;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">&lt;<a href="mailto:christian.bauer@gmail.com" target="_blank">christian.bauer@gmail.com</a>&gt;</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&#39;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>
&gt; On 22.05.2016, at 00:18, Christian Bauer &lt;<a href="mailto:christian.bauer@gmail.com">christian.bauer@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Already done. I don&#39;t think that affects HttpServletRequest#getRequestURL(), which is what Resteasy is using to populate UriInfo#getBaseUri()?<br>
&gt;<br>
&gt;&gt; set the proxy-address-forwarding=&quot;true&quot; for the http-listener.<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 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>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; keycloak-user mailing list<br>
&gt; <a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
&gt; <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>