Add Content Security Policy (CSP)
config
#4241
Labels
Type: New Feature
Issue contains a new feature or new component request
Milestone
Describe the feature you would like to see added
Currently, PrimeVue creates many style elements and directly append into head tag. While we deploy the app with strict CSP headers, many CSP style errors occur saying failed to inject inline styles.
Thus, to support CSP config, I think we could add a CSP config when creating PrimeVue vue plugin.
Is your feature request related to a problem?
Currently, our client apps are deployed with strict CSP report only headers. Although the app works, there are multiple errors in the console and multiple false positive CSP style errors are reported.
Describe the solution you'd like
Provide a CSP config when creating PrimeVue vue plugin, and use the provided CSP values when creating inlin style elements.
Describe alternatives you have considered
'unsafe-inline'
, but unfortunately we can't do for our case.setAttribute('nonce', ...)
code (we workaround with this for now, however could break between each version).Additional context
No response
The text was updated successfully, but these errors were encountered: