V2EX  ›  英汉词典
Enqueued related words: Clickjacking, X-Frame-Options

Frame-ancestors

定义 Definition

frame-ancestors 是网页安全策略 CSP(Content Security Policy,内容安全策略) 中的一条指令,用来规定哪些来源(origin)被允许把当前页面嵌入到 <frame> / <iframe> / <object> 等框架中。常用于防御点击劫持(clickjacking)
(它不是日常英语词汇,主要出现在 Web 安全与浏览器规范语境中。)

发音 Pronunciation (IPA)

/freɪm ˈænsɛstərz/

例句 Examples

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,使得只有受信任的合作方可以用框架嵌入该页面。

词源 Etymology

该术语由 frame(框架/嵌入) + ancestors(祖先) 组合而来:在 HTML 文档结构中,“祖先”指当前页面在嵌套关系里外层的父级/祖先级框架页面。因此 frame-ancestors 字面意思接近“允许哪些祖先框架来嵌入我”。

相关词 Related Words

文献与作品 Notable Works

  • W3C / WHATWG 相关规范Content Security Policy (CSP) Level 2 / Level 3(该指令在规范中被正式定义与举例)
  • MDN Web DocsCSP: frame-ancestors 条目(常见的学习与参考来源)
  • OWASP Cheat Sheet Series:与点击劫持、防御性响应头(Security Headers)相关的文档中常提及该指令或其替代/对比方案(如 X-Frame-Options)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2717 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 31ms · UTC 01:13 · PVG 09:13 · LAX 18:13 · JFK 21:13
♥ Do have faith in what you're doing.