Commit cc557833 authored by Sjoerd Mulder's avatar Sjoerd Mulder Committed by Andy Wilkinson

Escape backslashes in .properties examples of setting internal-proxies

In a properties file, a backslash is used as an escape character for
the line terminator sequence to allow values to be split across
multiple lines. When a backslash is used elsewhere they're stripped
out of the property's value.

This commit updates .properties-based examples for configuring
server.tomcat.internal-proxies to escape the backslahes so that they
are retained in the property's value at runtime.

See gh-1989
parent 9ef83358
...@@ -70,10 +70,10 @@ content into your application; rather pick only the properties that you need. ...@@ -70,10 +70,10 @@ content into your application; rather pick only the properties that you need.
server.ssl.trust-store-type= server.ssl.trust-store-type=
server.tomcat.access-log-pattern= # log pattern of the access log server.tomcat.access-log-pattern= # log pattern of the access log
server.tomcat.access-log-enabled=false # is access logging enabled server.tomcat.access-log-enabled=false # is access logging enabled
server.tomcat.internal-proxies=10\.\d{1,3}\.\d{1,3}\.\d{1,3}|\ server.tomcat.internal-proxies=10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}|\\
192\.168\.\d{1,3}\.\d{1,3}|\ 192\\.168\\.\\d{1,3}\\.\\d{1,3}|\\
169\.254\.\d{1,3}\.\d{1,3}|\ 169\\.254\\.\\d{1,3}\\.\\d{1,3}|\\
127\.\d{1,3}\.\d{1,3}\.\d{1,3} # regular expression matching trusted IP addresses 127\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3} # regular expression matching trusted IP addresses
server.tomcat.protocol-header=x-forwarded-proto # front end proxy forward header server.tomcat.protocol-header=x-forwarded-proto # front end proxy forward header
server.tomcat.port-header= # front end proxy port header server.tomcat.port-header= # front end proxy port header
server.tomcat.remote-ip-header=x-forwarded-for server.tomcat.remote-ip-header=x-forwarded-for
......
...@@ -493,7 +493,7 @@ to `application.properties`, e.g. ...@@ -493,7 +493,7 @@ to `application.properties`, e.g.
[indent=0] [indent=0]
---- ----
server.tomcat.internal_proxies=192\.168\.\d{1,3}\.\d{1,3} server.tomcat.internal_proxies=192\\.168\\.\\d{1,3}\\.\\d{1,3}
---- ----
Alternatively, you can take complete control of the configuration of the `RemoteIpValve` Alternatively, you can take complete control of the configuration of the `RemoteIpValve`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment