CSP in development #1511
denis-sokolov
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
Oh interesting! I like the idea of better templating support... |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is present in the latest 3.0.11. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a CSP Meta tag in my HTML:
In development mode, plugin-react-refresh adds inline scripts to my HTML, that trigger the CSP and prevent the scripts from loading. I assume more development mode plugins can manipulate HTML and add scripts.
I am currently using a workaround with a tiny plugin of my own:
Perhaps automatically adding unsafe-inline in development mode to a CSP Meta tag could be a good idea?
Alternatively, it would be convenient to get HTML conditionals based on %MODE%:
Beta Was this translation helpful? Give feedback.
All reactions