mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Upgrade to Tomcat 8.0.30 and continue to use absolute redirects
Tomcat 8.0.30 has changed to using relative URIs in its redirects by default. To avoid any problems that this behaviour change may causes we override the default and configure Tomcat to continue to use absolute URIs. Closes gh-4715
This commit is contained in:
parent
b10b7a883d
commit
ae6971a61a
@ -134,7 +134,7 @@
|
||||
<thymeleaf-extras-conditionalcomments.version>2.1.1.RELEASE</thymeleaf-extras-conditionalcomments.version>
|
||||
<thymeleaf-layout-dialect.version>1.2.9</thymeleaf-layout-dialect.version>
|
||||
<thymeleaf-extras-data-attribute.version>1.3</thymeleaf-extras-data-attribute.version>
|
||||
<tomcat.version>8.0.28</tomcat.version>
|
||||
<tomcat.version>8.0.30</tomcat.version>
|
||||
<undertow.version>1.1.9.Final</undertow.version>
|
||||
<velocity.version>1.7</velocity.version>
|
||||
<velocity-tools.version>2.0</velocity-tools.version>
|
||||
|
@ -167,6 +167,12 @@ public class TomcatEmbeddedServletContainerFactory
|
||||
context.setParentClassLoader(
|
||||
this.resourceLoader != null ? this.resourceLoader.getClassLoader()
|
||||
: ClassUtils.getDefaultClassLoader());
|
||||
try {
|
||||
context.setUseRelativeRedirects(false);
|
||||
}
|
||||
catch (NoSuchMethodError ex) {
|
||||
// Tomcat is < 8.0.30. Continue
|
||||
}
|
||||
SkipPatternJarScanner.apply(context, this.tldSkip);
|
||||
WebappLoader loader = new WebappLoader(context.getParentClassLoader());
|
||||
loader.setLoaderClass(TomcatEmbeddedWebappClassLoader.class.getName());
|
||||
|
Loading…
Reference in New Issue
Block a user