a11y.skipToMainContent
1

CSP 发电机

以可视化编辑器构建内容安全政策(CSP)头. 配置脚本、样式、图像、字体和连接的指示.

CSP Generator
CSP Header
More options
Was this tool helpful?
Send output to:
Advertisement

How to use CSP Generator

  1. 选择您需要的 CSP 指令 .
  2. 为每个指令添加允许的来源 .
  3. 为违规报告配置报告 - UR .
  4. 复制生成的 CSP 标题 .

{姓名}是什么来着?

A 内容安全政策生成器(CSP)创建了HTTP头来帮助防止跨站脚本(XSS),点击劫持,和代码注入攻击. CSP告诉浏览器允许哪些内容来源在您的页面上加载.

该工具为配置 CSP 指令提供了视觉界面,包括脚本-src,样式-src,img-src,字体-src,连接-src,等等. 它生成您可以添加到服务器配置的完整的 CSP 头值 。

Advertisement

FAQ

什么是内容安全政策?
CSP是一个安全层,能帮助检测并缓解某些类型的攻击,包括XSS和数据注入攻击.
CSP会破坏我的网站吗?
从只报告模式开始,在强制执行前先识别问题。 利用报告 - 里指令 收集违规报告.

Related tools

Author

NK
Prof. Noah Klein"The Privacy Guardian"

Cybersecurity Researcher & Privacy Advocate

Professor Klein holds a PhD in Information Security and has testified before EU parliamentary committees on data privacy legislation. He builds encryption tools for journalists, audits web applications for security flaws, and believes that privacy is not a feature but a fundamental right. His research has been cited in Wired, Nature, and The Guardian, and he advises nonprofits on responsible data stewardship.

Advertisement