Configure Content Security Policy (CSP) for Syncfusion Blazor components across Blazor Server, WebAssembly, and Auto render modes � self-hosted and CDN scenarios
Content Security Policy (CSP) configuration for Syncfusion Blazor components in browser-hosted applications (.NET 8, 9, 10).
Use this skill when you need to:
<meta> tag to App.razor or index.html for Syncfusion components| Directive | Value |
|---|
| Reason |
|---|
font-src | 'self' data: | Base64-encoded icon fonts |
style-src | 'self' 'unsafe-inline' | Inline styles for sizing/positioning |
script-src | 'self' | Dynamic code evaluation (animations, etc.) |
connect-src | 'self' https: wss: | WebSocket and HTTPS connections |
img-src | data: https: | Inline images and remote assets |
object-src | 'none' | Block plugin content |
CDN users: also append
https://cdn.syncfusion.com/blazor/toscript-srcandstyle-src.
| Project Type | File |
|---|---|
| Blazor Web App (.NET 8/9/10) any render mode | ~/Components/App.razor |
| Blazor WebAssembly Standalone | wwwroot/index.html |