Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enable useStrictCSP for cssInjectedByJsPlugin #143

Merged

Conversation

jsip
Copy link
Contributor

@jsip jsip commented Dec 5, 2023

Enables useStrictCSP when injecting styles. See https://github.com/marco-prontera/vite-plugin-css-injected-by-js#usestrictcsp-boolean

Does not throw any errors if meta property is not present

useStrictCSP ? `elementStyle.nonce = document.head.querySelector('meta[property=csp-nonce]')?.content;` : ''

Updated README to reflect the out of the box support

@neSpecc
Copy link
Contributor

neSpecc commented Dec 5, 2023

Thanks for mention this link. Please, add a line about this option in Readme

@jsip
Copy link
Contributor Author

jsip commented Dec 5, 2023

@neSpecc Let me know if the readme addition makes sense. I'll also be opening up PRs in header, marker, paragraph and list along with their respective readme updated shortly

@jsip jsip force-pushed the jsip-master/viteCssPlugin-UseStrictCSP branch from 29e1748 to c8f8047 Compare December 5, 2023 21:01
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@jsip jsip force-pushed the jsip-master/viteCssPlugin-UseStrictCSP branch from c8f8047 to 37feca2 Compare December 5, 2023 21:12
Copy link
Contributor

@neSpecc neSpecc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, update a patch version in package.json

@jsip jsip requested a review from neSpecc December 6, 2023 15:36
@neSpecc neSpecc merged commit 2948cd7 into editor-js:master Dec 11, 2023
@neSpecc
Copy link
Contributor

neSpecc commented Dec 11, 2023

Thanks @jsip! PRs to other tools are welcomed

@jsip
Copy link
Contributor Author

jsip commented Dec 11, 2023

@neSpecc Thank you for the quick merge! I've also opened PRs in editor-js/marker, editor-js/paragraph, editor-js/header and editor-js/list

The main repo for editor.js could also use this config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants