Fixes #20713. protocolHeader="X-Forwarded-Proto".

This commit is contained in:
Andrea Dell'Amico 2021-02-15 15:12:34 +01:00
parent 8b870bfb9e
commit c73136c06e
1 changed files with 10 additions and 3 deletions

View File

@ -126,6 +126,16 @@
-->
<Engine name="Catalina" defaultHost="localhost">
{% if tomcat_ajp_enabled %}
<!-- Automatically substitutes the IP with the one contained
in the x-forwarded-for header if that header is set -->
<Valve className="org.apache.catalina.valves.RemoteIpValve"
remoteIpHeader="X-Forwarded-For"
protocolHeader="X-Forwarded-Proto"
protocolHeaderHttpsValue="https"
/>
{% endif %}
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
@ -154,9 +164,6 @@
-->
{% if tomcat_access_log_enabled %}
<!-- Automatically substitutes the IP with the one contained
in the x-forwarded-for header if that header is set -->
<Valve className="org.apache.catalina.valves.RemoteIpValve" />
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="combined" -->