You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
http2: support adding never-index header fields #34091
This is definitely something that was considered early on when I did the initial implementation. It is hampered by the fact that we tried to keep the API for headers in http/2 as close as possible to that of http/1, which uses a simple object to express headers... e.g.
The difficulty here becomes: how do we indicate which headers should not be indexed? Should it be specified per-request? Should it be specified separately from the actual header pairs?
One way we could do this could be to allow a list of never-index header names as options whenever headers are specified... e.g.
@jasnellPersonally, I prefer option #2. Whoops! Realized there's only one option. 😄 It's similar to HTTP1 and makes never-index an "upgraded" option.
But, I think there's a theoretical possibility that needs to be explored. What if you want some headers to be indexed, and some not that are of the same header-field name? You might want to do:
Fwiw, I’m taking the Symbol-based approach (because I think information about headers should be passed in the headers object), but I’m not sure if we really want this kind of subdivision – if one of the cookie headers is sensitive, it’s probably okay to mark the others as sensitive as well.
Activity
jasnell commentedon Jun 30, 2020
This is definitely something that was considered early on when I did the initial implementation. It is hampered by the fact that we tried to keep the API for headers in http/2 as close as possible to that of http/1, which uses a simple object to express headers... e.g.
The difficulty here becomes: how do we indicate which headers should not be indexed? Should it be specified per-request? Should it be specified separately from the actual header pairs?
One way we could do this could be to allow a list of never-index header names as options whenever headers are specified... e.g.
Each method that accepts headers would need to be updated to accept an options object. This seems like the most ergonomic way to go.
addaleax commentedon Jun 30, 2020
@jasnell Just for context, I am already working on this :)
clshortfuse commentedon Jun 30, 2020
@jasnell
Personally, I prefer option #2.Whoops! Realized there's only one option. 😄 It's similar to HTTP1 and makesnever-indexan "upgraded" option.But, I think there's a theoretical possibility that needs to be explored. What if you want some headers to be indexed, and some not that are of the same header-field name? You might want to do:
PS: I use the term "sensitive" because one of the names the spec refers to them by:
jasnell commentedon Jun 30, 2020
If we want to go with that kind of approach, a Symbol-based option may be better...
addaleax commentedon Jun 30, 2020
Fwiw, I’m taking the Symbol-based approach (because I think information about headers should be passed in the headers object), but I’m not sure if we really want this kind of subdivision – if one of the cookie headers is sensitive, it’s probably okay to mark the others as sensitive as well.
http2: add support for sensitive headers
http2: add support for sensitive headers
http2: add support for sensitive headers
http2: add support for sensitive headers
http2: add support for sensitive headers
http2: add support for sensitive headers