This PR removes @ConditionalOnMissingFilterBean(ForwardedHeaderFilter.class)
on tomcatForwardedHeaderFilterCustomizer()
@Bean
method as it seems to have been added accidentally.
Comment From: izeye
ServletWebServerFactoryAutoConfigurationTests.relativeRedirectsShouldBeEnabledWhenUsingTomcatContainerAndUseRelativeRedirects()
has failed in this PR's build as follows:
> Task :spring-boot-project:spring-boot-autoconfigure:test FAILED
Found test failures in 1 test task:
:spring-boot-project:spring-boot-autoconfigure:test
org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfigurationTests > relativeRedirectsShouldBeEnabledWhenUsingTomcatContainerAndUseRelativeRedirects()
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':spring-boot-project:spring-boot-autoconfigure:test'.
> There were failing tests. See the report at: file:///tmp/build/6da1d659/git-repo/spring-boot-project/spring-boot-autoconfigure/build/reports/tests/test/index.html
I'm not sure why it has failed. I can't reproduce it with either IDE (IntelliJ) or Gradle locally. I might miss something here.
Comment From: wilkinsona
I don't understand why that's happening either. The annotation that you've removed should be redundant as it's already present on ForwardedHeaderFilterConfiguration
.
Comment From: wilkinsona
Thanks very much, @izeye. I too have failed to reproduce the failure locally. I also triggered a repeat CI build and it passed. We'll keep an eye out for the test being flaky and investigate if it happens again.