Re: [whatwg/fetch] Should `status = 0` be considered `ok` for `mode: no-cors`-requests? (#1140)

For security we cannot leak any information about the opaque response; including whether it succeeded or not.  So given its success status is unknown, do you make ok() return true or false?  If it returned true many developers would assume it was a success, when in fact it is unknown.  Therefore it returns false.  While inconvenient, it at least makes it more likely that developers understand the limitations of opaque responses.

At the end of the day, the issue is with opaque responses and not `ok()`.  I would recommend moving to CORS if you can.

-- 
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/1140#issuecomment-763133994

Received on Tuesday, 19 January 2021 20:55:41 UTC