[whatwg/fetch] Add request's referrer policy restriction (PR #1980)

Adds a request's referrer policy restriction, a mechanism to restrict the referrer policy (after the policy container fallback).
Unlike the referrer policy, it can only make the policy stricter. This is for https://github.com/w3c/csswg-drafts/issues/14872.

This is placed in the fetch spec to uniformly apply the restriction, rather than relying on individual callers to set restricted referrer policies.

<!--
Thank you for contributing to the Fetch Standard! Please describe the change you are making and complete the checklist below if your change is not editorial.

When you submit this PR, and each time you edit this comment (including checking a checkbox through the UI!), PR Preview will run and update it. As such make any edits in one go and only after PR Preview has run.

If you think your PR is ready to land, please double-check that the build is passing and the checklist is complete before pinging.
-->

- [ ] At least two implementers are interested (and none opposed):
   * Chromium: https://crbug.com/513521611
   * …
- [ ] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at:
   * … <!-- If these tests are tentative, link a PR to make them non-tentative. -->
- [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
   * Chromium: https://crbug.com/513521611
   * Gecko: …
   * WebKit: …
   * Deno (not for CORS changes): …
- [ ] [MDN issue](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) is filed: …
- [ ] The top of this comment includes a [clear commit message](https://github.com/whatwg/meta/blob/main/COMMITTING.md) to use. <!-- If you created this PR from a single commit, Github copied its message. Otherwise, you need to add a commit message yourself. -->

(See [WHATWG Working Mode: Changes](https://whatwg.org/working-mode#changes) for more details.)


<!--
    This comment and the below content is programmatically 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.
-->
***

### :boom: Error: 422 Unprocessable Entity :boom: ###

[PR Preview](https://github.com/specinfra/pr-preview#pr-preview) failed to build. _(Last tried on Nov 25, 2026, 10:36 AM UTC)_.

<details>
<summary>More</summary>


PR Preview relies on a number of web services to run. There seems to be an issue with the following one:

:rotating_light: [Spec Generator](https://www.w3.org/publications/spec-generator/) - Spec Generator is the web service used to build bikeshed/ReSpec specs

:link: [Related URL](https://www.w3.org/publications/spec-generator/?type=bikeshed-spec&output=html&url=https%3A%2F%2Fraw.githubusercontent.com%2Fhiroshige-g%2Ffetch%2F99cbe906bdf5a4d5bcbda62596755ff2ec6a7c00%2Ffetch.bs&force=1&md-status=LS-PR&md-Text-Macro=PR-NUMBER%201980)

**Error output:**

```json
[
    {
        "lineNum": "4949:2",
        "messageType": "link",
        "text": "No 'dfn' refs found for 'restrict a referrer policy'."
    },
    {
        "lineNum": null,
        "messageType": "failure",
        "text": "Did not generate, due to errors exceeding the allowed error level."
    }
]
```

_This seems to be an issue with the [Spec Generator](https://www.w3.org/publications/spec-generator/) service. PR Preview doesn't manage this service and so has no control over it. If you've identified an issue with it, you can [report the issue to the maintainers of Spec Generator](https://github.com/w3c/spec-generator/issues/new) directly. Please be courteous. Thank you!_

_If you don't have enough information above to solve the error by yourself or if the issue doesn't seem related to Spec Generator, you can [file an issue with PR Preview](https://github.com/specinfra/pr-preview/issues/new?title=Unidentified%20Error&body=See%20whatwg/fetch%231980.)._

</details>

You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Add request's referrer policy restriction

-- File Changes --

    M fetch.bs (15)

-- Patch Links --

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

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

Message ID: <whatwg/fetch/pull/1980@github.com>

Received on Wednesday, 25 November 2026 10:37:33 UTC