[英]How to remove X-Frame-Options SAMEORIGIN header from request header in NGINX?
enter image description here在此处输入图像描述
Hello, everyone i need to remove X-Frame-Options SAMEORIGIN header from request header.i use nginx server and all setup is in aws.大家好,我需要从请求 header 中删除X-Frame-Options SAMEORIGIN header。我使用 nginx 服务器,所有设置都在 aws 中。
i try following solution but it does't work for me.我尝试以下解决方案,但它对我不起作用。
proxy_hide_header 'x-frame-options';
And i got error like.我得到了类似的错误。
I think this can't be done with the out-of-the-box nginx build.我认为这不能通过开箱即用的 nginx 构建来完成。 Additionally,
proxy_hide_header
directive used to hide headers from upstream, not from client browser.此外,
proxy_hide_header
指令用于隐藏上游而不是客户端浏览器的标头。 One of the solutions is to use more_clear_headers
directive from ngx_headers_more
module, but for that you need to build nginx from sources (or use OpenResty instead).解决方案之一是使用来自
ngx_headers_more
模块的more_clear_headers
指令,但为此您需要从源代码构建 nginx(或改用OpenResty )。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.