Create Content Security Policy (CSP) Trusted Site
sf_create_csp_settingCreate a Content Security Policy trusted site to let LWC and Visualforce load external resources, specifying allowed directives like script-src and img-src.
Instructions
Creates a Content Security Policy trusted site, allowing LWC components and Visualforce pages to load resources from external URLs. CSP settings are needed when your LWC uses external JavaScript libraries, fonts, images, or APIs. Specify which directives (connect-src, script-src, style-src, img-src, etc.) the URL is trusted for.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| isActive | No | Whether this setting is active | |
| description | No | Description of why this URL is trusted | |
| endpointUrl | Yes | Trusted URL for CSP, e.g. 'https://cdn.example.com' | |
| cspDirectives | Yes | CSP directives this URL is trusted for |