Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

extended CSP handling #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

glaszig
Copy link

@glaszig glaszig commented Aug 16, 2019

currently, only the script-src directive gets the webpack dev server url appended and that under the assumption that i'd like my script-src replaced the following way:

replace script-src 'self' with script-src 'self' 'unsafe-eval' http://webpack.

which only really works if i have a policy of excactly script-src 'self' ....
also, it does not append all the other necessary policies, that is:

  • connect-src for the hot-reload feature of webpack
  • font-src for webpack-packaged fonts
  • style-src for webpack-packaged stylesheets
  • script-src for webpack-packaged javascripts

this patch fixes this.

also introduces proper testing (at least for this feature).

to the appropriate content security policies

that is:
- connect-src: for the hot-reload feature of webpack
- font-src: for webpack-packaged fonts
- style-src: for webpack-packaged stylesheets
- script-src: for webpack-packaged javascripts
@glaszig
Copy link
Author

glaszig commented Feb 11, 2021

bump

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

Successfully merging this pull request may close these issues.

1 participant