Spring redirect url issue when behind Zuul proxy

后端 未结 2 1010
有刺的猬
有刺的猬 2021-02-20 11:24

I\'ve been trying to get to the bottom of a strange redirection issue for the past 2 days without success.

Based on the spring-cloud example projects, I\'ve configured E

2条回答
  •  盖世英雄少女心
    2021-02-20 12:07

    If you are using tomcat as embeded server in your backend app, you could use this settings (application.properties, yml, etc):

    server.tomcat.remote_ip_header=x-forwarded-for
    server.tomcat.protocol_header=x-forwarded-proto
    

    Or more generic way:

    server.use-forward-headers=true
    

提交回复
热议问题