File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -155,14 +155,17 @@ export default isFetchSupported && (async (config) => {
155155 withCredentials = withCredentials ? 'include' : 'omit' ;
156156 }
157157
158+ // Cloudflare Workers throws when credentials are defined
159+ // see https://github.com/cloudflare/workerd/issues/902
160+ const isCredentialsSupported = "credentials" in Request . prototype ;
158161 request = new Request ( url , {
159162 ...fetchOptions ,
160163 signal : composedSignal ,
161164 method : method . toUpperCase ( ) ,
162165 headers : headers . normalize ( ) . toJSON ( ) ,
163166 body : data ,
164167 duplex : "half" ,
165- credentials : withCredentials
168+ credentials : isCredentialsSupported ? withCredentials : undefined
166169 } ) ;
167170
168171 let response = await fetch ( request ) ;
You can’t perform that action at this time.
0 commit comments