欢迎访问张朋的技术分享社区
当前位置: 首页 > 技术分享  > Safety

禁止网站页面被别人嵌入到iframe

2018/12/13 9:43:36 人评论

<system.webServer> <httpProtocol> <customHeaders> <add name="X-Frame-Options" value="SAMEORIGIN" /> </customHeaders> </httpProtocol> </system.webServer>(1)DENY:不能被嵌入到…

<system.webServer>

  <httpProtocol>

    <customHeaders>

      <add name="X-Frame-Options" value="SAMEORIGIN" />

    </customHeaders>

  </httpProtocol>

  </system.webServer>

(1)DENY:不能被嵌入到任何iframe或frame中。
(2)SAMEORIGIN:页面只能被本站页面嵌入到iframe或者frame中。
(3)ALLOW-FROM uri:只能被嵌入到指定域名的框架中。

附件下载

相关技术

    暂无相关的数据...

共有条评论 网友评论

验证码: 看不清楚?