Re: [whatwg/fetch] Header to opt out of opaque redirect (#601)

> In my SPA, my server could return a 3xx response requiring the user to reauthenticate with a third party oauth provider. The fact that there is no way for me to simply read the 'location' header and intercept the fetch redirect to do a _real_ redirect instead has singlehandled put me back to using nasty XMLHttpRequests. :'( I thought we've moved on from this!

Nope, can't return 3xx when making "ajax" requests.  Nothing you can return in XmlHttpRequest or fetch can be read by the browser.  At least with XmlHttpRequest the server can tell by looking at the X-Requested-with header and change th er response from 3xx to something else. 

This is now causing work work-arounds in jQuery, fetch, angular, react, react-native, etc.

WhatWG ppl, are we listening yet or do you still think this is a reasonable course of action?

-- 
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/issues/601#issuecomment-615215824

Received on Friday, 17 April 2020 12:26:33 UTC