Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Add RemoteIpValve
Browse files Browse the repository at this point in the history
As the Tomcat instance created by this buildpack is always located
behind a proxy, this change adds the RemoteIpValve to the Tomcat
configuration.  This change ensures that functionality such as
HttpServletRequest.isSecure() works properly in the Cloud Foundry
environment.

[#52956737, #8]
  • Loading branch information
nebhale committed Jul 11, 2013
1 parent 2814403 commit 436b1b6
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions resources/tomcat/conf/server.xml
Expand Up @@ -27,14 +27,17 @@

<Service name="Catalina">

<Connector port="${http.port}" protocol="HTTP/1.1"
connectionTimeout="20000" bindOnInit="false"/>
<Connector port="${http.port}" protocol="HTTP/1.1" connectionTimeout="20000" bindOnInit="false"/>

<Engine name="Catalina" defaultHost="localhost">

<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.RemoteIpValve" protocolHeader="x-forwarded-proto"/>

<Host name="localhost" appBase="webapps"unpackWARs="true" autoDeploy="true">
</Host>

</Engine>

</Service>
</Server>

</Server>

0 comments on commit 436b1b6

Please sign in to comment.