-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add a "disable everything" feature #6
Comments
Are you saying that you'd like something that disables all features? Or are you thinking of something else? |
A shorthand in the library to disable all would be nice, I'm happy to make a PR for that tomorrow - although I was referring to a specific 'None' value for the header rather than manually disabling them all. I can't quite make out from the Mozilla docs if there is such a value. E.G. |
It's possible that I'm missing something when reading the spec, but it looks like there's no simple "disable everything", even with an empty policy. Could you (or anyone else reading this issue) confirm that? Once we figure out the path forward, we can implement the "block everything" feature. |
I'm joining discussion late, but it would also be nice to have an option to opt out of everything via plugin config - so that every directive will be set to 'none', perhaps with an option to set some rules differently. For example in order to disable everything, but allow full screen: {
defaultForAll: ["'none'"],
features: {
fullscreen: ["'self'"],
}
} Obviously this might not work for everything, but this is what I have in mind at the moment. |
Could someone confirm that there's no spec-compliant way to disable all features? Once someone does that, I can move forward with the code change.
|
It looks like this issue is being discussed at w3c/webappsec-permissions-policy#189. I think we should wait on that discussion before picking anything here. |
@EvanHahn: if i understand correctly, the discussion here implies of having default values for each feature and give the ability to override it. from security perspective, we take the most restrictive way as the default. thus, setting what do you think? |
There are two options.
I'm still waiting for that issue to be resolved before I make a decision, but it has been a long time so maybe I should reconsider. |
Because the See #10 and helmetjs/helmet#234 for more discussion. |
For example, currently writing an API -
Feature-Policy: None
would be absolutely magical.I did take a look at the Moz docs and I couldn't quite figure out if it's supported yet.
The text was updated successfully, but these errors were encountered: