-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
move config to config/content-security-policy.js #104
move config to config/content-security-policy.js #104
Conversation
@sandstrom This was discussed with rwjblue in #103 (comment) cause otherwise the configuration is not accessible from Ember CLI commands. Please raise any concerns as this changes what we had discussed in #92. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add an example to the README.md for the default configuration? The more thorough example (using mixpanel, google fonts, etc) is great, but it would be nice to also show the bare minimum default config as well.
With this approach we can also add a blueprint that gets ran when ember-cli-content-security-policy
is installed that will create a default config/content-security-policy.js
file for them.
@@ -25,7 +25,7 @@ ember install ember-cli-content-security-policy | |||
|
|||
## Configuration | |||
|
|||
This addon is configured via your application's `ember-cli-build.js` file using `ember-cli-content-security-policy` key: | |||
This addon is configured via `config/content-security-policy.js` file. | |||
|
|||
- `delivery: string[]` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about including a typescript style interface here instead of this list? I did something similar over in ember-cli-babel's README, and I personally find it easier to follow than this bulleted list format.
Sorry for the noise in this issue though, we can do whatever changes we want to this bit of the README separately from your PR.
Co-Authored-By: Robert Jackson <me@rwjblue.com>
Whoops, sorry about that! Seems good to be separate too though. |
Moves configuration from
ember-cli-build.js
toconfig/content-security-policy.js
.This is mainly motivated by the complexity required to get build-time configuration in different stages of an addon. Build-time config is not available in all hooks and does not seem to be available at all for commands.
This should unblock #103.