syncfusion-blazor-security
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSyncfusion Blazor Security
Syncfusion Blazor 安全
Content Security Policy (CSP) configuration for Syncfusion Blazor components in browser-hosted applications (.NET 8, 9, 10).
为浏览器托管应用(.NET 8、9、10)中的Syncfusion Blazor组件配置内容安全策略(CSP)。
When to Use
适用场景
Use this skill when you need to:
- Add a CSP tag to
<meta>orApp.razorfor Syncfusion componentsindex.html - Configure CSP for self-hosted (Static Web Assets) script and style delivery
- Configure CSP for CDN-hosted Syncfusion scripts and styles
- Understand which CSP directives Syncfusion components require and why
在以下场景中使用本技能:
- 为Syncfusion组件在或
App.razor中添加CSPindex.html标签<meta> - 为自托管(静态Web资源)的脚本和样式交付配置CSP
- 为CDN托管的Syncfusion脚本和样式配置CSP
- 了解Syncfusion组件所需的CSP指令及其原因
Quick Reference
快速参考
- Full CSP guide: See content-security-policy.md
- 完整CSP指南:请参阅content-security-policy.md
Required CSP Directives at a Glance
必备CSP指令概览
| Directive | Value | Reason |
|---|---|---|
| | Base64-encoded icon fonts |
| | Inline styles for sizing/positioning |
| | Dynamic code evaluation (animations, etc.) |
| | WebSocket and HTTPS connections |
| | Inline images and remote assets |
| | Block plugin content |
CDN users: also appendtohttps://cdn.syncfusion.com/blazor/andscript-src.style-src
| 指令 | 值 | 原因 |
|---|---|---|
| | Base64编码的图标字体 |
| | 用于尺寸/定位的内联样式 |
| | 动态代码评估(动画等) |
| | WebSocket和HTTPS连接 |
| | 内联图片和远程资源 |
| | 阻止插件内容 |
CDN用户注意:还需在和script-src后追加style-src。https://cdn.syncfusion.com/blazor/
Where to Add the CSP Tag
CSP标签添加位置
| Project Type | File |
|---|---|
| Blazor Web App (.NET 8/9/10) any render mode | |
| Blazor WebAssembly Standalone | |
| 项目类型 | 文件 |
|---|---|
| Blazor Web App(.NET 8/9/10)任意渲染模式 | |
| Blazor WebAssembly 独立应用 | |