Skip to content

Commit 02e925c

Browse files
committed
Merge branch 'gh-1989' into 1.1.x
2 parents 9ef8335 + 2b4eee5 commit 02e925c

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ content into your application; rather pick only the properties that you need.
7070
server.ssl.trust-store-type=
7171
server.tomcat.access-log-pattern= # log pattern of the access log
7272
server.tomcat.access-log-enabled=false # is access logging enabled
73-
server.tomcat.internal-proxies=10\.\d{1,3}\.\d{1,3}\.\d{1,3}|\
74-
192\.168\.\d{1,3}\.\d{1,3}|\
75-
169\.254\.\d{1,3}\.\d{1,3}|\
76-
127\.\d{1,3}\.\d{1,3}\.\d{1,3} # regular expression matching trusted IP addresses
73+
server.tomcat.internal-proxies=10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}|\\
74+
192\\.168\\.\\d{1,3}\\.\\d{1,3}|\\
75+
169\\.254\\.\\d{1,3}\\.\\d{1,3}|\\
76+
127\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3} # regular expression matching trusted IP addresses
7777
server.tomcat.protocol-header=x-forwarded-proto # front end proxy forward header
7878
server.tomcat.port-header= # front end proxy port header
7979
server.tomcat.remote-ip-header=x-forwarded-for

spring-boot-docs/src/main/asciidoc/howto.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,9 +493,13 @@ to `application.properties`, e.g.
493493

494494
[indent=0]
495495
----
496-
server.tomcat.internal_proxies=192\.168\.\d{1,3}\.\d{1,3}
496+
server.tomcat.internal_proxies=192\\.168\\.\\d{1,3}\\.\\d{1,3}
497497
----
498498

499+
NOTE: The double backslashes are only required when you're using a properties file for
500+
configuration. If you are using YAML, single backslashes are sufficient and a value
501+
that's equivalent to the one shown above would be `192\.168\.\d{1,3}\.\d{1,3}`.
502+
499503
Alternatively, you can take complete control of the configuration of the `RemoteIpValve`
500504
by configuring and adding it in a `TomcatEmbeddedServletContainerFactory` bean.
501505

0 commit comments

Comments
 (0)