Skip to content

Commit 9a198d0

Browse files
committed
fix: set credentials
1 parent f26add1 commit 9a198d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/classes/Cortex.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@ export class Cortex {
2424
throw new Error('API Key is required');
2525
}
2626

27+
const isCredentialsSupported = 'credentials' in Request.prototype;
28+
2729
this.client = createAPIFetchClient({
2830
...options,
2931
headers: {
3032
Authorization: `Bearer ${this.apiKey}`,
3133
...options.headers,
3234
},
35+
credentials: isCredentialsSupported ? 'omit' : undefined,
3336
});
3437

3538
this.apiMethods = createAPI(this.api);

0 commit comments

Comments
 (0)