Skip to content

CSP for integrations

Declare extra hosts in stratolms.config.mjs:

csp: {
additions: {
'script-src': ['https://plausible.io'],
'connect-src': ['https://plausible.io'],
},
allowInlineStyleAttributes: false,
}

buildCsp rejects 'unsafe-inline' and 'unsafe-eval' in script-src, HTTP hosts, wildcards, and changes to locked directives (frame-ancestors, base-uri, object-src). The style-attribute opt-in is only for highlighters that emit style= on elements.