[HTML5] Fetch API now passes credentials.

Used default value before, i.e. "same-origin", now uses "include" (i.e.
include for cross-origin if cross-origin is allowed).

(cherry picked from commit ffe248cbdf)
This commit is contained in:
Fabio Alessandrelli 2022-02-10 21:04:31 +01:00 committed by Rémi Verschelde
parent 7a16bb2ee4
commit 8988a9bcec
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 0 deletions

View File

@ -89,6 +89,7 @@ const GodotFetch = {
method: method, method: method,
headers: headers, headers: headers,
body: body, body: body,
credentials: 'include',
}; };
obj.request = fetch(url, init); obj.request = fetch(url, init);
obj.request.then(GodotFetch.onresponse.bind(null, id)).catch(GodotFetch.onerror.bind(null, id)); obj.request.then(GodotFetch.onresponse.bind(null, id)).catch(GodotFetch.onerror.bind(null, id));