Spring MVC “redirect:” prefix always redirects to http — how do I make it stay on https?

后端 未结 7 1210
鱼传尺愫
鱼传尺愫 2020-12-07 16:28

I solved this myself, but I spent so long discovering such a simple solution, I figured it deserved to be documented here.

I have a typical Spring 3 MVC setup with

相关标签:
7条回答
  • 2020-12-07 17:22

    I add scheme="https" in file server.xml for connector with port="80":

    <Connector port="80" protocol="HTTP/1.1" URIEncoding="UTF-8"
    connectionTimeout="20000" redirectPort="443" scheme="https" />
    
    0 讨论(0)
提交回复
热议问题