Spring Boot with embedded Tomcat behind Apache proxy

前端 未结 7 1381
暖寄归人
暖寄归人 2020-12-08 09:51

We have a Spring Boot (Spring MVC) app with embedded Tomcat on a dedicated appserver behind an Apache SSL proxy.

The SSL port on the proxy server is 4433, forwarding

7条回答
  •  情话喂你
    2020-12-08 10:39

    There are several properties that you can configure, related to this. application.yaml example:

    server:
      forward-headers-strategy: native
      tomcat:
        use-relative-redirects: true
        protocol-header: x-forwarded-proto
        remote-ip-header: x-forwarded-for
    

    Setting server.forward-headers-strategy: native is the replacement of the deprecated server.use-forward-headers:true

提交回复
热议问题