iframe嵌套页面 拒绝访问 X-Frame-Options配置
iframe拒绝访问
X-Frame-Options: deny
X-Frame-Options: sameorigin
X-Frame-Options: allow-from https://example.com/
deny 表示该页面不允许在 frame 中展示,即便是在相同域名的页面中嵌套也不允许。
sameorigin 表示该页面可以在相同域名页面的 frame 中展示。
allow-from uri 表示该页面可以在指定来源的 frame 中展示。
注意事项:设置元标记没有作用
<meta http-equiv="X-Frame-Options" content="deny">