咸鱼韭菜

专注LANMP

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

点击劫持

  • frame buseting
if (top.location != location) {
    top.location = self.location  
}

html5的sandbox属性       和iframe 的security属性   可以使frame busting失效

 

  • X-Frame-Options    http头

    DENY        拒绝当前页面加载任何frame

    SAMEORIGIN        frame只能加载同源域名页面

    ALLOW-FROM      允许加载所有frame

posted on 2017-08-06 10:37  咸鱼韭菜  阅读(141)  评论(0)    收藏  举报