1

When Tomcat's standard redirection is used the server generates a HTTP status code 302. Is it possible to change this code to 307?

Tomcat's standard redirection:

conf/server.xml:
  <Connector port="8080" protocol="HTTP/1.1" redirectPort="8443" ...
  <Connector port="8443" protocol="HTTP/1.1" scheme="https" SSLEnabled="true" secure="true" ...

conf/web.xml
  <security-constraint>
    <web-resource-collection>
      <web-resource-name>server</web-resource-name>
      <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <user-data-constraint>
      <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
  </security-constraint>

There is a similar question. However, the questioner has the possibility to extend LaxRedirectStrategy which we don't have. If possible we would prefer to change a configuration setting only.

Community
  • 1
  • 1
Claude
  • 1,724
  • 3
  • 17
  • 46

0 Answers0