In Spring Boot 1.5.4, when using Tomcat 8.0.30 or later, the TomcatEmbeddedServletContainerFactory sets the Tomcat context property useRelativeRedirects to false. I would like a configuration option (e.g. server.tomcat.useRelativeRedirects=true) to change this hard-coded default.
My scenario is this: I have a Spring boot application sitting behind a load balancer VIP. SSL is also terminated at the load balancer. With relative redirects set to false, the URL sent back from a redirect has both the wrong host (i.e. the host name, not the VIP) as well as the wrong scheme (http instead of https).
I know I can register TomcatContextCustomizer, but that seems like a lot of code for a single boolean value.
Thanks!
In Spring Boot 1.5.4, when using Tomcat 8.0.30 or later, the
TomcatEmbeddedServletContainerFactorysets the Tomcat context propertyuseRelativeRedirectstofalse. I would like a configuration option (e.g.server.tomcat.useRelativeRedirects=true) to change this hard-coded default.My scenario is this: I have a Spring boot application sitting behind a load balancer VIP. SSL is also terminated at the load balancer. With relative redirects set to
false, the URL sent back from a redirect has both the wrong host (i.e. the host name, not the VIP) as well as the wrong scheme (http instead of https).I know I can register
TomcatContextCustomizer, but that seems like a lot of code for a single boolean value.Thanks!