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

Create blueprint config/content-security-policy.js on installation #147

Open
jelhan opened this issue Jul 15, 2020 · 1 comment
Open

Create blueprint config/content-security-policy.js on installation #147

jelhan opened this issue Jul 15, 2020 · 1 comment

Comments

@jelhan
Copy link
Collaborator

jelhan commented Jul 15, 2020

The addon should create a blueprint config/content-security-policy.js with default values on installation. This will make it much more obvious for consumers how to customize the policy.

We have two options how to deal with legacy configuration:

  1. Not create a config/content-security-policy.js if legacy configuration exists.
  2. Migrate legacy configuration from config/environment.js to config/content-security-policy.js as part of the blueprint.

It will be difficult to do the later one in a safe way if the existing configuration depends on environment, environment variables etc. It would require AST parsing for sure in this cases. It will also be difficult to make sure that all legacy configuration is removed. In some cases that might even be impossible.

I'm tending towards option 1 as it's less complex and we already have legacy support in place.

@rwjblue
Copy link
Member

rwjblue commented Jul 15, 2020

Ya, agree. Let's go with option 1 for now, it will help all new users (quite a bit) and we will have to write a detailed upgrade guide (if we haven't already) for the legacy config -> new config anyways.

@jelhan jelhan added this to the Release v2.0 milestone Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants