Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Announcement modals were designed to be configurable without deployments. Images, however, had to be added into the bundle they could be used in these modals.
To fully decouple announcement modal updates with code deployment/releases, we will need a way for the modal to load images from external sources. The most straightforward approach would be to use a file-link.
In order for this to work, we need to whitelist our file bucket's url in the content security policy.
Solution
A single codebase is now responsible for customising the CSP for 4 different environments. Fortunately, it turns out the S3_BUCKET is a compulsory env var which can be directly mapped to the correct bucket url, so I'm opting to use that.
Result