美文网首页
Nginx 配置防止页面的非同源嵌套

Nginx 配置防止页面的非同源嵌套

作者: Medicine_8d60 | 来源:发表于2020-05-06 14:41 被阅读0次

在Nginx的 nginx.conf文件的 http 内加入以下代码

add_header X-Frame-Options SAMEORIGIN;

编辑html代码,嵌套要测试的网站页面:

<html>
<frameset cols="50%,50%">
  <frame src="http://xxx.xxxxxx.cn/m_index.html">
  <frame src="http://yyy.xxxxxx.cn/m_index.html">
</frameset>
</html>

相关文章

网友评论

      本文标题:Nginx 配置防止页面的非同源嵌套

      本文链接:https://www.haomeiwen.com/subject/wmhwghtx.html