mcpField
S
syncfusion-blazor-security

syncfusion-blazor-security

github.com/syncfusionSecurity4375 installsUpdated 1w ago
Repository

About syncfusion-blazor-security

A reference skill for configuring Content Security Policy in browser-hosted Syncfusion Blazor applications on .NET 8, 9, and 10. It covers self-hosted assets and CDN delivery.

Key features

  1. 01CSP directives for Syncfusion components
  2. 02Self-hosted asset configuration
  3. 03CDN script and style configuration
  4. 04CSP placement by Blazor project type

Use cases

  1. 01Adding a CSP tag to App.razor or index.html
  2. 02Setting CSP rules for self-hosted assets
  3. 03Allowing CDN-hosted Syncfusion resources

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/syncfusion/blazor-ui-components-skills --skill syncfusion-blazor-security

After installing, type/syncfusion-blazor-securityin Claude Code to confirm it loaded.

Bundled filesreferences/content-security-policy.md

Details

From the project README

Syncfusion Blazor Security

Content Security Policy (CSP) configuration for Syncfusion Blazor components in browser-hosted applications (.NET 8, 9, 10).

When to Use

Use this skill when you need to:

  • Add a CSP <meta> tag to App.razor or index.html for Syncfusion components
  • 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

Quick Reference

Required CSP Directives at a Glance

DirectiveValueReason
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-srcdata: https:Inline images and remote assets
object-src'none'Block plugin content

CDN users: also append https://cdn.syncfusion.com/blazor/ to script-src and style-src.

Where to Add the CSP Tag

Project TypeFile
Blazor Web App (.NET 8/9/10) any render mode~/Components/App.razor
Blazor WebAssembly Standalonewwwroot/index.html

Comments

Markdown supported