Is there a client-side way to detect X-Frame-Options?

后端 未结 8 718
温柔的废话
温柔的废话 2020-12-28 12:16

Is there any good way to detect when a page isn\'t going to display in a frame because of the X-Frame-Options header? I know I can request the page serverside and look for

8条回答
  •  旧时难觅i
    2020-12-28 12:51

    Online test tools might be useful. I used https://www.hurl.it/. you can clearly see the response header. Look for X-frame-option. if value is deny - It will not display in iframe. same origin- only from the same domain, allow- will allow from specific websites.

    If you want to try another tool, you can simply google for 'http request test online'.

提交回复
热议问题