首先参考nginx配置https并强制http自动跳转到https配置nginx的https证书。

然后在application.properties中加上属性如下:

server.tomcat.remote_ip_header=x-forwarded-for
server.tomcat.protocol_header=x-forwarded-proto
server.tomcat.port-header=X-Forwarded-Port
server.use-forward-headers=true

其他就无需特殊处理可以了,websocket也无须特殊处理。

相关文章:

  • 2021-07-22
  • 2022-01-04
  • 2021-07-28
  • 2021-08-19
  • 2021-10-28
  • 2022-02-24
  • 2022-01-24
  • 2021-11-02
猜你喜欢
  • 2021-12-18
  • 2021-09-23
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
相关资源
相似解决方案