-
Notifications
You must be signed in to change notification settings - Fork 326
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
Use referrer policy from policy container #1233
Conversation
This depends on whatwg/html#6677 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but we should also update this note:
This can be used to override a referrer policy associated with an environment settings object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we'll wait for @domfarolino to double check (as he's also signed up for the other PRs), but this looks good from my perspective. Thanks!
Done, although I am not sure about the formulation (in principle, this can be used to override policy container's referrer policy, which in turn can be used to override the environment settings objects' policy container's referrer policy). |
I've been traveling the last few days; I'll check this out within the next two days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
This change moves referrer policy from Document/WorkerGlobalScope into policy container. This allows us to simplify several steps (initializing for new empty documents, populating from the response headers, inheriting for local scheme documents), since they are handled centrally via the policy container mechanisms. Companion PRs: * whatwg/fetch#1233 * w3c/ServiceWorker#1593 (removes referrer policy from service workers as that comes for free with policy container) * w3c/webappsec-referrer-policy#152 The change is mostly a refactoring and should have no significant behavioral changes, apart from simplifying the referrer policy inheritance mechanism. The most visible behavioral change of this is that referrer policy of a srcdoc iframe will be now copied from the parent document at creation time instead of referencing the parent document referrer policy.
This is a companion change to whatwg/html#6677, which moves referrer policy into the policy container.
As a consequence of this change, the referrer policy used for the request is a snapshot of the relevant referrer policy when the request is being created, and won't change during the lifetime of the request, addressing a variant of #832 for referrer policy.
Preview | Diff