-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
request help: The response head was strangely modified after passing APISIX #4213
Comments
adding |
upstream services is ingress-controller ,I can get the head if I bypass APISIX and visit the upstream |
what is the value of |
这3个是用来cors跨越名访问用的, 还有我之前也有往头里加cache-control: no-cache(清除浏览器缓存)这个过完apisix后也不见了 |
经过测试需要加上插件proxy-cache,并设置hide_cache_headers:false 才能返回给客户端,但是我不太明白为什么会这样呢,这个插件是必须要加的吗? |
The proxy-cache plugin is not necessary, you can provide route related configuration data, I will check it. |
{ |
I confirmed that it has been resolved in APISIX 2.5 |
那我可以先用proxy-cache这个插件配置hide_cache_headers:false 这种方式解决吗,会有什么影响吗,我目前吧这个插件配成全局插件了,我的是2.3版本 |
This solution looks good to me. If possible, please upgrade to 2.5. |
Consider solved by #3789 |
Issue description
我通过修改本地的hosts对路由在postman上分别做了测试,一种是通过apisix,一种是直接访问后端的ip地址,结果是通过apisix后响应头被不知道什么原因的修改了,下面是不过apisix和过apisix的两种情况
这是后端往响应头上加头信息的代码:
没有开任何的插件,service配的也是穿透模式,不太明白为什么会这样。。
Environment
apisix version
):apache/apisix:2.3-alpineThe text was updated successfully, but these errors were encountered: