Adding Headers to Zuul when re-directing

微笑、不失礼 提交于 2019-12-01 18:09:07

I guess you use a Route Filter, maybe you can try with a Pre Filter.

Adding a custom header can be done with something like this : context.addZuulRequestHeader("Authorization", "Basic " + credentials);.

For the redirection part, you can check this thread

I update my comment here just in case if anyone is still facing this problem. I found this problem recently and resolved by adding the following configuration in my application.yml

application.yml ... zuul: sensitive-headers: - Cookie,Set-Cookie ...

Reference Link below:
https://cloud.spring.io/spring-cloud-static/Dalston.SR5/multi/multi__router_and_filter_zuul.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!