-
Notifications
You must be signed in to change notification settings - Fork 512
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
feat(playground): allow img from blob and data #9771
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran npm start
in cloud-function
, but the example still doesn't work on https://localhost/en-US/docs/Web/API/File_API/Using_files_from_web_applications#example_using_object_urls_to_display_images and fails with:
Content-Security-Policy: The page’s settings blocked the loading of a resource at blob:https://live.mdnyalp.dev/650da1da-2c37-4d55-afc9-6a6ed7f9e85c (“default-src”).
Tips?
@fiji-flo Can you elaborate how you tested this locally?
|
@fiji-flo I'm using these in my
Do I have to make a local build with |
I'm running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified that this resolves the issue (comparing the result with main
).
PS: Didn't work at first, because I hadn't run npm run copy-internal
. 🤷
Summary
Fixes #9463.
fixes live sample in https://developer.mozilla.org/en-US/docs/Web/API/File_API/Using_files_from_web_applications#example_using_object_urls_to_display_images
Problem
We do not allow blob urls in the playground
Solution
Add according CSP and also allow
data:
.How did you test this change?
Locally running the cloud function.