简体   繁体   English

如何从 NGINX 中的请求 header 中删除 X-Frame-Options SAMEORIGIN header?

[英]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.我得到了类似的错误。

enter image description here在此处输入图像描述

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.

相关问题 X-Frame选项sameorigin问题 - X-Frame options sameorigin issue aws ec2“被 X-Frame-Options 策略阻止” - aws ec2 “Blocked by X-Frame-Options Policy” iframe不会仅通过更改subdmain来启动URL(不是X-Frame-Options问题) - Iframe not launching URL just by changing subdmain (not a X-Frame-Options issue) 如何绕过 header 从请求进入 header 以响应 AWS API 网关? - How to bypass header from request into header in response in AWS API Gateway? 如何从 HTTP 响应 header 中删除 noindex - How to remove noindex from HTTP response header 如何将标头从请求传递到集成响应? - How to pass header from request to integration response? Cors - 如何处理需要自定义标头的预检选项请求? (AWS:使用 vpc 端点的私有 API 网关) - Cors - how to handle preflight options request that requires a custom header? (AWS: private API gateway using a vpc endpoint) 使用x-amz-tagging请求标头指定标签 - Specify tags using the x-amz-tagging request header 如何配置 Phusion 乘客 X 框架选项? - How to configure Phusion Passenger X-frame options? 从S3迁移到Redshift DB时如何删除标题行? - How do I remove Header Row when migrating from S3 to Redshift DB?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM