This content has been marked as final.
Show 4 replies
-
1. Re: Using https scheme behind proxy
ctomc Apr 14, 2014 11:41 AM (in response to abazylewicz)add proxy-address-forwarding="true" to http-listener
-
2. Re: Re: Using https scheme behind proxy
abazylewicz Apr 15, 2014 3:49 AM (in response to ctomc)It looks like this option does not work for me. I already had this config:
<subsystem xmlns="urn:jboss:domain:undertow:1.0"> <buffer-caches> <buffer-cache name="default" buffer-size="1024" buffers-per-region="1024" max-regions="10"/> </buffer-caches> <server name="default-server"> <http-listener name="default" socket-binding="http" proxy-address-forwarding="true"/> <host name="default-host" alias="localhost"> <location name="/" handler="welcome-content"/> <filter-ref name="server-header"/> <filter-ref name="x-powered-by-header"/> </host> </server> <servlet-container name="default" default-buffer-cache="default" stack-trace-on-error="local-only"> <jsp-config/> </servlet-container> <handlers> <file name="welcome-content" path="${jboss.home.dir}/welcome-content" directory-listing="true"/> </handlers> <filters> <response-header name="server-header" header-name="Server" header-value="Wildfly 8"/> <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow 1"/> </filters> </subsystem>
But in my app request.getScheme() is still returning "http"
-
3. Re: Re: Using https scheme behind proxy
ctomc Apr 15, 2014 7:43 AM (in response to abazylewicz)1 of 1 people found this helpfulhow is your proxy server configured?
does it send X-Forwarded-* headers?
-
4. Re: Re: Re: Using https scheme behind proxy
abazylewicz Apr 15, 2014 12:10 PM (in response to ctomc)Thanks for the suggestion!
I checked our apache configuration, and it turns out that after adding:
RequestHeader set X-Forwarded-Proto "https" ProxyPreserveHost On
everything works as expected.