Update RemoteIpValve’s default internal proxies to include 172.16/12
Closes gh-2699
This commit is contained in:
parent
5e4a745620
commit
1fe1aa8939
|
@ -294,7 +294,10 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
|
|||
private String internalProxies = "10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}|" // 10/8
|
||||
+ "192\\.168\\.\\d{1,3}\\.\\d{1,3}|" // 192.168/16
|
||||
+ "169\\.254\\.\\d{1,3}\\.\\d{1,3}|" // 169.254/16
|
||||
+ "127\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"; // 127/8
|
||||
+ "127\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}|" // 127/8
|
||||
+ "172\\.1[6-9]{1}\\.\\d{1,3}\\.\\d{1,3}|" // 172.16/12
|
||||
+ "172\\.2[0-9]{1}\\.\\d{1,3}\\.\\d{1,3}|"
|
||||
+ "172\\.3[0-1]{1}\\.\\d{1,3}\\.\\d{1,3}";
|
||||
|
||||
/**
|
||||
* Header that holds the incoming protocol, usually named "X-Forwarded-Proto".
|
||||
|
|
|
@ -83,7 +83,10 @@ content into your application; rather pick only the properties that you need.
|
|||
server.tomcat.internal-proxies=10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}|\\
|
||||
192\\.168\\.\\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}|\\
|
||||
172\\.1[6-9]{1}\\.\\d{1,3}\\.\\d{1,3}|\\
|
||||
172\\.2[0-9]{1}\\.\\d{1,3}\\.\\d{1,3}|\\
|
||||
172\\.3[0-1]{1}\\.\\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.port-header= # front end proxy port header
|
||||
server.tomcat.remote-ip-header=x-forwarded-for
|
||||
|
|
Loading…
Reference in New Issue