We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When trying to use redaxios on CloudFlare Workers it will throw the following error:
The 'credentials' field on 'RequestInitializerDict' is not implemented.
As the default is same-origin for credentials this could probably be worked around by not passing a credentials property when withCredentials is set to false: https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials
withCredentials
The text was updated successfully, but these errors were encountered:
credentials
RequestInitializerDict
In case you do not use this field and want a patch to make it go:
diff --git a/node_modules/redaxios/src/index.js b/node_modules/redaxios/src/index.js index cca6534..a630e9a 100644 --- a/node_modules/redaxios/src/index.js +++ b/node_modules/redaxios/src/index.js @@ -199,7 +199,9 @@ function create(defaults) { method: (_method || options.method || 'get').toUpperCase(), body: data, headers: deepMerge(options.headers, customHeaders, true), - credentials: options.withCredentials ? 'include' : _undefined + // Cloudflare Workers does not implement this and we do not need it + // https://github.com/developit/redaxios/issues/64 + // credentials: options.withCredentials ? 'include' : _undefined }).then((res) => { for (const i in res) { if (typeof res[i] != 'function') response[i] = res[i];
Sorry, something went wrong.
CloudFlare should really not be throwing here.
No branches or pull requests
When trying to use redaxios on CloudFlare Workers it will throw the following error:
As the default is same-origin for credentials this could probably be worked around by not passing a credentials property when
withCredentials
is set to false:https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials
The text was updated successfully, but these errors were encountered: