allenwas3

需求:nginx 代理 https,后面的 tomcat 处理 http 请求,sso 的客户端,重定向时需要带上 target,而这个 target 默认是 tomcat 的 http,现在需要把这个 target 的 http 变成 https。

 

# nginx添加配置:
proxy_set_header        X-Forwarded-Port $server_port;
proxy_set_header        X-Forwarded-Proto $scheme;

# spring boot 配置
server:
  tomcat:
    port-header: X-Forwarded-Port
    protocol-header: X-Forwarded-Proto

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-01-07
  • 2022-01-07
  • 2022-01-07
  • 2021-11-19
  • 2022-12-23
  • 2021-12-31
  • 2021-12-02
猜你喜欢
  • 2022-01-07
  • 2021-12-03
  • 2021-12-13
  • 2022-01-07
  • 2022-02-12
  • 2022-12-23
相关资源
相似解决方案