禁止iframe技术:X-Frame-Options frame-ancestors

X-Frame-Options

DENY:禁止iframe
SAMEORIGIN:只允许相同域名下的网页iframe,同源政策保护
ALLOW-FROM: https://example.com:白名单限制

但这个缺陷就是chrome、Safari是不支持ALLOW-FROM语法!

php代码如下:

header("X-Frame-Options: allow-from http://lemon.tv");

 

frame-ancestors、frame-src

https://cloud.tencent.com/developer/section/1189865

frame-ancestors影响以下标签: