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

feat: working Content Security Policy #76

Merged
merged 5 commits into from
Jul 15, 2021
Merged

feat: working Content Security Policy #76

merged 5 commits into from
Jul 15, 2021

Conversation

dnsos
Copy link
Contributor

@dnsos dnsos commented Jul 15, 2021

This PR implements a working Content Security Policy (the first, already merged attempt was unsuccessful).

The policy should now satisfy all requirements of our code and of 3rd party code. Note that especially Mapbox GL JS requires some pretty lax settings. The library uses new Function() which is a violation of unsafe-eval. For now we have to live with allowing unsafe-eval because that piece of code has long been in Mapbox GL JSs codebase and will probably not be refactored. Interestingly the use of unsafe-eval is not covered in their CSP docs.

Hint: When reviewing, check the Response Headers in the dev tools Network tab to see the CSP in action.

@vercel
Copy link

vercel bot commented Jul 15, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/technologiestiftung/stadtpuls-frontend/6rZZF3EmiS4b7yk7KxripRDmjXww
✅ Preview: https://stadtpuls-frontend-git-feat-working-csp-technologiestiftung1.vercel.app

@dnsos dnsos changed the title Feat/working csp feat: working Content Security Policy Jul 15, 2021
@dnsos dnsos marked this pull request as ready for review July 15, 2021 06:59
@dnsos dnsos requested a review from vogelino as a code owner July 15, 2021 06:59
@dnsos dnsos merged commit b266bc3 into main Jul 15, 2021
@dnsos dnsos deleted the feat/working-CSP branch July 15, 2021 07:42
@tsboter
Copy link

tsboter commented Mar 29, 2022

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants