-
-
Notifications
You must be signed in to change notification settings - Fork 439
fix(google integration): add frame-src CSP header #75
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
Conversation
|
Thanks for the suggestion. Could you please explain what the problem is being fixed, what environment the problem is visible in and how the change fixes that problem? |
sorry I just added a description |
|
Hi, Can you please test with |
|
Any updates on this? @davidjgraph When trying to open a file from authorized storage a blocked iframe is shown: When headers removed from there: This is happening in a self-hosted environment where those CSP headers are injected to decouple from the cloud-hosted version Hope this makes it to a new version |
|
What are the exact, complete steps to reproduce the problem? |
|
@davidjgraph you can use the following docker-compose to run setup locally + you'll need to create google app to get credentials Steps:
|
|
Hi, You can customize the CSP using the environment variable DRAWIO_CSP_HEADER |
|
@ashrafteleb you are right, that looks to be the temporary fix until it's added to default CSP. On top of what you've mentioned, I've added 3 missing domains for frame-src for this to work properly My full CSP added as env variable DRAWIO_CSP_HEADER: @millaguie try with this above, it works for me + removed unsafe-inline as it's not needed and better to avoid unless necessary |
|
I'm don't see it's a bug that the CSP applies the most restrictive policy. The majority of users won't integrate with Google, so I'd think that should be a custom setting and documented. |


While using Google Drive as the backend you have to ensure to allow CSP frame-src from google or it will fail to log in, due to CSP restrictions.
This allows that and fixes the issue