|
|
|
@ -130,6 +130,7 @@ class ServerPropertiesTests {
|
|
|
|
|
map.put("server.tomcat.remoteip.protocol-header", "X-Forwarded-Protocol");
|
|
|
|
|
map.put("server.tomcat.remoteip.remote-ip-header", "Remote-Ip");
|
|
|
|
|
map.put("server.tomcat.remoteip.internal-proxies", "10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}");
|
|
|
|
|
map.put("server.tomcat.reject-illegal-header", "true");
|
|
|
|
|
map.put("server.tomcat.background-processor-delay", "10");
|
|
|
|
|
map.put("server.tomcat.relaxed-path-chars", "|,<");
|
|
|
|
|
map.put("server.tomcat.relaxed-query-chars", "^ , | ");
|
|
|
|
@ -152,6 +153,7 @@ class ServerPropertiesTests {
|
|
|
|
|
assertThat(tomcat.getRemoteip().getRemoteIpHeader()).isEqualTo("Remote-Ip");
|
|
|
|
|
assertThat(tomcat.getRemoteip().getProtocolHeader()).isEqualTo("X-Forwarded-Protocol");
|
|
|
|
|
assertThat(tomcat.getRemoteip().getInternalProxies()).isEqualTo("10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}");
|
|
|
|
|
assertThat(tomcat.getRejectIllegalHeader()).isTrue();
|
|
|
|
|
assertThat(tomcat.getBackgroundProcessorDelay()).hasSeconds(10);
|
|
|
|
|
assertThat(tomcat.getRelaxedPathChars()).containsExactly('|', '<');
|
|
|
|
|
assertThat(tomcat.getRelaxedQueryChars()).containsExactly('^', '|');
|
|
|
|
@ -405,6 +407,11 @@ class ServerPropertiesTests {
|
|
|
|
|
.isEqualTo(new RemoteIpValve().getInternalProxies());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
void tomcatRejectIllegalHeaderDefaultsToNull() {
|
|
|
|
|
assertThat(this.properties.getTomcat().getRejectIllegalHeader()).isNull();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
void tomcatUseRelativeRedirectsDefaultsToFalse() {
|
|
|
|
|
assertThat(this.properties.getTomcat().isUseRelativeRedirects()).isFalse();
|
|
|
|
|