use of org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory in project spring-boot by spring-projects.
the class TomcatWebServerFactoryCustomizerTests method disableRemoteIpValve.
@Test
void disableRemoteIpValve() {
bind("server.tomcat.remoteip.remote-ip-header=", "server.tomcat.remoteip.protocol-header=");
TomcatServletWebServerFactory factory = customizeAndGetFactory();
assertThat(factory.getEngineValves()).isEmpty();
}
use of org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory in project spring-boot by spring-projects.
the class TomcatServletWebServerFactoryCustomizerTests method customizeAndGetFactory.
private TomcatServletWebServerFactory customizeAndGetFactory() {
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(0);
this.customizer.customize(factory);
return factory;
}
use of org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory in project spring-boot by spring-projects.
the class TomcatServletWebServerFactoryCustomizerTests method testCustomTldSkip.
private void testCustomTldSkip(String... expectedJars) {
TomcatServletWebServerFactory factory = customizeAndGetFactory();
assertThat(factory.getTldSkipPatterns()).contains(expectedJars);
assertThat(factory.getTldSkipPatterns()).contains("junit-*.jar", "spring-boot-*.jar");
}
use of org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory in project spring-boot by spring-projects.
the class TomcatWebServerFactoryCustomizerTests method forwardHeadersWhenStrategyIsNoneShouldNotConfigureValve.
@Test
void forwardHeadersWhenStrategyIsNoneShouldNotConfigureValve() {
this.environment.setProperty("DYNO", "-");
this.serverProperties.setForwardHeadersStrategy(ServerProperties.ForwardHeadersStrategy.NONE);
TomcatServletWebServerFactory factory = customizeAndGetFactory();
assertThat(factory.getEngineValves()).hasSize(0);
}
use of org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory in project spring-boot by spring-projects.
the class TomcatWebServerFactoryCustomizerTests method customizeAndGetFactory.
private TomcatServletWebServerFactory customizeAndGetFactory() {
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(0);
this.customizer.customize(factory);
return factory;
}
Aggregations