It turns out Chrome Canary automatically uses the credentials (cookie) even if credentials: 'include' is not passed to fetch's options parameter.
So to make fetch work on all browsers, instead of this:
await fetch('urlHere');
Pass credentials: 'include' option explicitly instead:
await fetch('urlHere', {credentials: 'include'});
No comments:
Post a Comment