Skip to main content

syncfusion-aspnetcore-security

**CONTENT SECURITY POLICY (CSP) GUIDE** — Assist with configuring Syncfusion ASP.NET Core EJ2 components to work with strict Content Security Policy (CSP) headers. Use when: implementing CSP headers, generating and applying nonces to inline scripts/styles, configuring external font allowlists, or troubleshooting CSP violations.

来源信息

仓库
syncfusion/aspnetcore-ui-components-skills
最近来源活动
2026年7月6日 07:20
检测到的 SKILL.md 语言
英语
星标
0
Forks
3

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
syncfusion-aspnetcore-security
description
**CONTENT SECURITY POLICY (CSP) GUIDE** — Assist with configuring Syncfusion ASP.NET Core EJ2 components to work with strict Content Security Policy (CSP) headers. Use when: implementing CSP headers, generating and applying nonces to inline scripts/styles, configuring external font allowlists, or troubleshooting CSP violations.
metadata
{"author":"Syncfusion Inc","version":"34.1.29"}
# Content Security Policy (CSP) — Syncfusion ASP.NET Core (Security) Use this skill for high-level, Syncfusion-specific CSP guidance and references. Detailed code snippets and implementation examples live in the concern's `references` files. ## When to Use - Implementing CSP headers for Syncfusion EJ2 controls - Running in strict CSP mode where inline scripts/styles are restricted - Adding nonces to inline scripts/styles for Syncfusion initialization - Allowlisting CDN resources or external fonts required by Syncfusion themes ## Quick Checklist - Generate a cryptographically secure nonce per request - Add the nonce to the CSP header and to all Syncfusion script/style tags - Allow required CDN origins and font providers in CSP directives - Avoid `unsafe-inline`/`unsafe-eval` unless absolutely necessary - Verify behavior in browser DevTools and address CSP violations ## Generic Guidelines (Summary) - Generate nonces early in the pipeline and store them in `HttpContext` for views - Use minimal, explicit CSP directives (prefer `'self'`, explicit hostnames, and `'nonce-<value>'`) - Prefer data binding over inline templates to avoid `unsafe-eval` requirements - Document your CSP policy and the reasons for any relaxations ## References - Main implementation and examples: [references/csp-guide.md](references/csp-guide.md)
在 GitHub 查看