-
Notifications
You must be signed in to change notification settings - Fork 0
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
CSP headers break schema #68
CSP headers break schema #68
Comments
Three potential fixes: Exclude the schema URLs. This is the quick way but does need to include all component URLs since they are "prefixes"
Allow sources for SCP
Also might be extra per project source e.g. OZ wants the vng github The more proper way might be to install |
Looking at drf-spectacular-sidecar, this seems to me to be the proper route. If you don't need externally hosted scripts served via a CDN then setting CSP headers site-wide becomes a lot easier. This combined with the move from yasg to spectacular for OZ means that this should work for all components. As an aside, Sergei pointed out that /admin was also excluded in CSP_EXCLUDE_URL_PREFIXES. This shouldn't be the case (the whole reason why we added CSP to OAf was for /admin.
|
Refinement:,Will be fixed in all components. |
…cular 🐛[#68] add CSP headers for DRF spectacular schema
…ular-fix 🔧[maykinmedia/open-api-framework#68] fix CSP errors
Product versie / Product version
0.8.0
Omschrijf het probleem / Describe the bug
CSP headers prevent schema from loading external scripts
Reported here, maykinmedia/open-klant#242/
Confirmed in OpenZaak 1.14
Stappen om te reproduceren / Steps to reproduce
/contactgegevens/api/v1/schema/
Verwacht gedrag / Expected behavior
Page should loader correctly
The text was updated successfully, but these errors were encountered: