-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Should remove report-uri
from CSP if used in meta tag
#148
Comments
I think stripping when you are using both delivery mechanism is probably fine, but I have a couple questions:
|
There shouldn't be a warning if
Good question. I'm not aware of any actual use case. But it's currently supported by our configuration interface. |
D'oh, sorry, yes. |
OK, I'm sold. 😸 Warning seems fine (definitely better than what we do right now). |
Good idea! You probably know already, but [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-uri |
This was partly addressed by #158. Before the addon was adding a A @sandstrom Thanks for mentioning deprecation of |
Reopening. I would still like to remove |
The
report-uri
directive is only supported if CSP is delivered using HTTP header. It's not allowed if CSP is delivered using meta tag. If included in a CSP meta tag the browser throws an error. If the user configures the addon to deliver CSP both with HTTP header and meta tag he doesn't have any chance to prevent that error.To avoid confusion we should strip the
report-uri
directive from CSP if included in meta tag. We should instead add a build time warning if user explicitly sets thereport-uri
directive butdelivery
option does not include'header'
.The text was updated successfully, but these errors were encountered: