V2EX  ›  英汉词典

Img-src

释义 Definition

img-src 通常指 内容安全策略(Content Security Policy, CSP)中的一条指令,用来规定网页允许从哪些来源加载图片(如 <img>、CSS 背景图等)。常见写法如:img-src 'self' https: data:;

发音 Pronunciation (IPA)

/ˈɪmɪdʒ ˌɛs ɑːr ˈsiː/

例句 Examples

Set img-src 'self' https: to allow images from the same site and HTTPS sources.
img-src 'self' https: 设定为允许从同站点与 HTTPS 来源加载图片。

In a strict CSP, misconfiguring img-src can cause third‑party avatars and tracking pixels to fail, which may break parts of the user interface.
在严格的 CSP 中,如果 img-src 配置不当,第三方头像和追踪像素可能无法加载,从而导致界面部分功能异常。

词源 Etymology

img(image 的常见缩写,表示“图片”)和 src(source 的缩写,表示“来源”)组合而成,中间用连字符连接,作为 CSP 指令名使用,字面意思就是“图片来源”。

相关词 Related Words

文献与作品 Notable Works

  • W3C Recommendation: Content Security Policy Level 3(CSP3 规范文本)
  • MDN Web Docs: Content-Security-Policy — img-src directive(MDN 文档条目)
  • OWASP Cheat Sheet Series: Content Security Policy Cheat Sheet(OWASP 安全实践文档)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1110 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 23:43 · PVG 07:43 · LAX 16:43 · JFK 19:43
♥ Do have faith in what you're doing.