Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcd1c6d commit 550d885Copy full SHA for 550d885
1 file changed
lib/adapters/fetch.js
@@ -155,14 +155,17 @@ export default isFetchSupported && (async (config) => {
155
withCredentials = withCredentials ? 'include' : 'omit';
156
}
157
158
+ // Cloudflare Workers throws when credentials are defined
159
+ // see https://github.com/cloudflare/workerd/issues/902
160
+ const isCredentialsSupported = "credentials" in Request.prototype;
161
request = new Request(url, {
162
...fetchOptions,
163
signal: composedSignal,
164
method: method.toUpperCase(),
165
headers: headers.normalize().toJSON(),
166
body: data,
167
duplex: "half",
- credentials: withCredentials
168
+ credentials: isCredentialsSupported ? withCredentials : undefined
169
});
170
171
let response = await fetch(request);
0 commit comments