Skip to content

Commit 8e5bcd8

Browse files
authored
Merge pull request #127 from appwrite/dev
fix: remove credentials when devKeys is set
2 parents 5a0e36c + 76f137e commit 8e5bcd8

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { Client, Account } from "appwrite";
3333
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:
3434

3535
```html
36-
<script src="https://cdn.jsdelivr.net/npm/[email protected].0"></script>
36+
<script src="https://cdn.jsdelivr.net/npm/[email protected].1"></script>
3737
```
3838

3939

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "appwrite",
33
"homepage": "https://appwrite.io/support",
44
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
5-
"version": "18.1.0",
5+
"version": "18.1.1",
66
"license": "BSD-3-Clause",
77
"main": "dist/cjs/sdk.js",
88
"exports": {

src/client.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ class Client {
316316
'x-sdk-name': 'Web',
317317
'x-sdk-platform': 'client',
318318
'x-sdk-language': 'web',
319-
'x-sdk-version': '18.1.0',
319+
'x-sdk-version': '18.1.1',
320320
'X-Appwrite-Response-Format': '1.7.0',
321321
};
322322

@@ -638,9 +638,12 @@ class Client {
638638
let options: RequestInit = {
639639
method,
640640
headers,
641-
credentials: 'include',
642641
};
643642

643+
if (headers['X-Appwrite-Dev-Key'] === undefined) {
644+
options.credentials = 'include';
645+
}
646+
644647
if (method === 'GET') {
645648
for (const [key, value] of Object.entries(Client.flatten(params))) {
646649
url.searchParams.append(key, value);

0 commit comments

Comments
 (0)