How to stop my website being framed by others?

前端 未结 2 1087
Happy的楠姐
Happy的楠姐 2020-12-17 07:17

How can I stop my website from loading in a frame?

As can be seen here: http://yehg.net/lab/pr0js/pentest/cross_site_framing.php

Google.com won\'t load, ms

2条回答
  •  感动是毒
    2020-12-17 07:23

    This little script snippet should work:

    
    

    Also, you can prevent your pages from being loaded in an iframe by specifying a X-Frame-Options: DENY header. See https://developer.mozilla.org/en-US/docs/The_X-FRAME-OPTIONS_response_header for details.

提交回复
热议问题