frame-ancestors 是网页安全策略 CSP(Content Security Policy,内容安全策略) 中的一条指令,用来规定哪些来源(origin)被允许把当前页面嵌入到 <frame> / <iframe> / <object> 等框架中。常用于防御点击劫持(clickjacking)。
(它不是日常英语词汇,主要出现在 Web 安全与浏览器规范语境中。)
/freɪm ˈænsɛstərz/
The site uses frame-ancestors 'none' to prevent being embedded in an iframe.
该网站使用 frame-ancestors 'none' 来防止被嵌入到 iframe 中。
To protect sensitive pages, the server sets a CSP header with frame-ancestors https://partner.example so only a trusted partner can frame it.
为保护敏感页面,服务器在 CSP 头里设置 frame-ancestors https://partner.example,使得只有受信任的合作方可以用框架嵌入该页面。
该术语由 frame(框架/嵌入) + ancestors(祖先) 组合而来:在 HTML 文档结构中,“祖先”指当前页面在嵌套关系里外层的父级/祖先级框架页面。因此 frame-ancestors 字面意思接近“允许哪些祖先框架来嵌入我”。