Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle http headers when behind a well configured proxy #70

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,19 @@
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost">
<!--
Handle X-Forwarded-Proto and X-Forwarded-For http header when
behind a well configured proxy.

* X-Forwarded-Proto is to preserve the original proto (httpS)
from the client connecting URL.

* X-Forwarded-For (set by default by the Valve) is to preserve the
original client IP in the logs. Otherwise the nearest proxy IP
will be logged, much less useful for auditing.
-->
<Valve className="org.apache.catalina.valves.RemoteIpValve"
protocolHeader="X-Forwarded-Proto" />

<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
Expand Down