-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Content Security Policy] Add nonce
support for <img>
and other tags
#3445
Comments
compulim
added
Enhancement
customer-reported
Required for internal Azure reporting. Do not delete.
Bot Services
Required for internal Azure reporting. Do not delete. Do not change color.
labels
Sep 1, 2020
10 tasks
compulim
changed the title
Add
[Content Security Policy] Add Sep 1, 2020
nonce
support for <img>
and other tagsnonce
support for <img>
and other tags
Currently, And in the definition of The following HTML will fail to load the image: <!DOCTYPE html>
<head>
<meta http-equiv="Content-Security-Policy" content="img-src nonce-a1b2c3" />
</head>
<body>
<img nonce="a1b2c3" src="https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg" />
</body>
</html> With the following error:
|
3 tasks
Looks like this is not doable until browser support |
compulim
removed
Bot Services
Required for internal Azure reporting. Do not delete. Do not change color.
customer-reported
Required for internal Azure reporting. Do not delete.
labels
Sep 1, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Request
In #3393 (PR #3443), we added a new prop
nonce
. This prop is currently used for injecting<style>
element.We should expand this prop to support
<img>
and other media elements that requires nonce to operate.What it will change
(This CSP is not exhaustive, just to illustrate the differences.)
Today
Developer must use a URL-based source for
<img>
and other media elements.In Web Chat, when we render an image from the bot:
Tomorrow
Developer can use a nonce-based source for
<img>
and other media elements.In Web Chat, when we render an image from the bot, the nonce will be added:
[Enhancement]
The text was updated successfully, but these errors were encountered: