[whatwg/fetch] Check Feature Policy before attaching Client Hints (#811)

This PR is part of an attempt to address https://github.com/WICG/feature-policy/issues/129 – using Feature Policy to let authors opt-into sending specific Client Hints to specific origins.

The overall, basic idea is:

1. A new set of policy-controlled features – one for each Client Hint header field – is defined in the Client Hints spec.
2. A new algorithm which determines whether a request is able to use a policy-controlled feature is defined in the Feature Policy spec.
3. The step in Fetch that appends Client Hint headers calls the new algorithm, checking if a request is allowed to use a Client Hints’ policy-controlled feature before appending the Client Hint header. That change is contained in this PR.


<!--
    This comment and the below content is programatically generated.
    You may add a comma-separated list of anchors you'd like a
    direct link to below (e.g. #idl-serializers, #idl-sequence):

    Don't remove this comment or modify anything below this line.
    If you don't want a preview generated for this pull request,
    just replace the whole of this comment's content by "no preview"
    and remove what's below.
-->
***
<a href="https://whatpr.org/fetch/811.html" title="Last updated on Sep 24, 2018, 4:14 PM GMT (8760549)">Preview</a> | <a href="https://whatpr.org/fetch/811/daca6a8...8760549.html" title="Last updated on Sep 24, 2018, 4:14 PM GMT (8760549)">Diff</a>
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/fetch/pull/811

-- Commit Summary --

  * Check Feature Policy before sending Client Hints
  * Add Feature-Policy biblio reference

-- File Changes --

    M fetch.bs (19)

-- Patch Links --

https://github.com/whatwg/fetch/pull/811.patch
https://github.com/whatwg/fetch/pull/811.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/811

Received on Monday, 24 September 2018 16:15:14 UTC