Thursday, April 1, 2021

Web Application Potentially Vulnerable to Clickjacking (nginx)

在 nginx 配置文件添加:

add_header X-Frame-Options SAMEORIGIN;


三个选项:
DENY
表示该页面不允许在 frame 中展示,即便是在相同域名的页面中嵌套也不允许。
SAMEORIGIN
表示该页面可以在相同域名页面的 frame 中展示。
ALLOW-FROM URI
表示该页面可以在指定来源的 frame 中展示。
 

注: 在网页中设置meta标签是无用的!例如,<meta http-equiv="X-Frame-Options" content="deny"> 是没有效果的。不要使用这种方式。需要在下面的配置实例中配置HTTP Header的方式来进行配置,X-Frame-Options才会起作用。

 

参考:

https://www.imperva.com/learn/application-security/clickjacking/ 

https://www.jianshu.com/p/51cc683402f0

 

No comments:

Post a Comment

华为交换机option43和60实例

AC: Aruba 651- 10.77.25.1 AP: Aruba 105 - 172.17.2.0/24 SW: 华为S5720  ip pool pool2  gateway-list 172.17.2.1  network 172.17.2.0 mask 255.255...