Expose redirectCount for TAO opted-in redirect chains#12513
Conversation
annevk
left a comment
There was a problem hiding this comment.
I don't understand how this works. What if one redirect allows it and one doesn't?
I may have gotten this wrong, but I thought TAO check only passes if the entire redirect chain has |
|
No, TAO check only looks at a single response. There's https://fetch.spec.whatwg.org/#concept-response-timing-allow-passed but I don't actually know if that works well for navigations. Navigations are messy. |
A bit of Claude-assisted digging got me to:
So I think that simply changing the TAO check to looking at the response's timing-allow-passed value should work.. Let me know if you agree |
|
Yeah that looks correct. I think there are still issues with it, but this is not one of them. There is still the question as to whether it's okay that same-origin redirects end up exposed without opt-in. |
Yeah, I'll open a separate issue RE that |
|
|
In w3c/navigation-timing#215 (comment) @achristensen07 suggests that we should also take the "noreferrer" values into account. This seems like we could add that condition here. In the context of Fetch, I'm working on a PR to create navigation-specific TAO checks that look at the destination origin. |
Thinking about this, I think it makes sense. We can think of it as:
|
|
As far as implementer support, Chrome team is supportive. |
Fixes w3c/navigation-timing#215
(See WHATWG Working Mode: Changes for more details.)
/document-lifecycle.html ( diff )
/infrastructure.html ( diff )