use of org.springframework.boot.web.embedded.jetty.ConfigurableJettyWebServerFactory in project spring-boot by spring-projects.
the class JettyWebServerFactoryCustomizerTests method deduceUseForwardHeaders.
@Test
void deduceUseForwardHeaders() {
this.environment.setProperty("DYNO", "-");
ConfigurableJettyWebServerFactory factory = mock(ConfigurableJettyWebServerFactory.class);
this.customizer.customize(factory);
then(factory).should().setUseForwardHeaders(true);
}
use of org.springframework.boot.web.embedded.jetty.ConfigurableJettyWebServerFactory in project spring-boot by spring-projects.
the class JettyWebServerFactoryCustomizerTests method forwardHeadersWhenStrategyIsNativeShouldConfigureValve.
@Test
void forwardHeadersWhenStrategyIsNativeShouldConfigureValve() {
this.serverProperties.setForwardHeadersStrategy(ServerProperties.ForwardHeadersStrategy.NATIVE);
ConfigurableJettyWebServerFactory factory = mock(ConfigurableJettyWebServerFactory.class);
this.customizer.customize(factory);
then(factory).should().setUseForwardHeaders(true);
}
use of org.springframework.boot.web.embedded.jetty.ConfigurableJettyWebServerFactory in project spring-boot by spring-projects.
the class JettyWebServerFactoryCustomizerTests method forwardHeadersWhenStrategyIsNoneShouldNotConfigureValve.
@Test
void forwardHeadersWhenStrategyIsNoneShouldNotConfigureValve() {
this.environment.setProperty("DYNO", "-");
this.serverProperties.setForwardHeadersStrategy(ServerProperties.ForwardHeadersStrategy.NONE);
ConfigurableJettyWebServerFactory factory = mock(ConfigurableJettyWebServerFactory.class);
this.customizer.customize(factory);
then(factory).should().setUseForwardHeaders(false);
}
use of org.springframework.boot.web.embedded.jetty.ConfigurableJettyWebServerFactory in project spring-boot by spring-projects.
the class JettyWebServerFactoryCustomizerTests method setUseForwardHeaders.
@Test
void setUseForwardHeaders() {
this.serverProperties.setForwardHeadersStrategy(ForwardHeadersStrategy.NATIVE);
ConfigurableJettyWebServerFactory factory = mock(ConfigurableJettyWebServerFactory.class);
this.customizer.customize(factory);
then(factory).should().setUseForwardHeaders(true);
}
use of org.springframework.boot.web.embedded.jetty.ConfigurableJettyWebServerFactory in project spring-boot by spring-projects.
the class JettyWebServerFactoryCustomizerTests method defaultUseForwardHeaders.
@Test
void defaultUseForwardHeaders() {
ConfigurableJettyWebServerFactory factory = mock(ConfigurableJettyWebServerFactory.class);
this.customizer.customize(factory);
then(factory).should().setUseForwardHeaders(false);
}
Aggregations