-
Notifications
You must be signed in to change notification settings - Fork 705
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
Improve hint-no-disallowed-headers
#1096
Comments
rule-no-disallowed-headers
hint-no-disallowed-headers
After reading that article and looking at the code from this hint, I think we could safely add the following headers into the list of disallowed headers:
If I understand correctly, the hint also supports configuring ignored headers, so even if, by some chance, someone was using those outdated headers, they would be able to ignore the warnings. The only thing I'm wondering about is: it's easy enough to add them to the What do you think @antross ? |
@captainbrosset having more detailed messages on a per-header basis would be great! We can keep the general message for any headers we don't have something more to say about (or additional ones included via the webhint configuration that aren't part of the default set). Also, there are a couple of related issues in this space:
|
This change adds the `Expires`, `Host`, `P3P`, `Pragma`, `Via` and `X-Frame-Options` headers to the `hint-no-disallowed-headers` hint. This was based on advices from https://www.fastly.com/blog/headers-we-dont-want. These hints are introduced with specific warning messages, rather than by being added to the general list of headers already present in the hint. Specifically, this change moves some of the logic from the constructor to other places to make it smaller and easier to read. It renames the `disallowedHeaders` property to something more explanatory and introduces a new special list of disallowed headers, each with their own warning message. - - - - - - - - - - - - - - - - - - - - Fix #1096 Close #3776
Taking the liberty to comment on this issue, especially regarding the The article linked in the original message from this issue also mentions this. Although it does say it’s most likely safe to remove (which I’m not arguing here), it also states that proxies have to set it up, and most people don’t have control over their proxy.
I was wondering if you’d be considering dropping the |
Look over: https://www.fastly.com/blog/headers-we-dont-want, and see if we can add more unneeded headers to the list.
The code for this hint is under
packages/hint-no-disallowed-headers/
The text was updated successfully, but these errors were encountered: