diff --git a/README.md b/README.md index 78e6905..48e37b6 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ import { Client, Account } from "appwrite"; To install with a CDN (content delivery network) add the following scripts to the bottom of your tag, but before you use any Appwrite services: ```html - + ``` diff --git a/package.json b/package.json index 73e2f11..02f06b6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "appwrite", "homepage": "https://appwrite.io/support", "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", - "version": "18.1.0", + "version": "18.1.1", "license": "BSD-3-Clause", "main": "dist/cjs/sdk.js", "exports": { diff --git a/src/client.ts b/src/client.ts index 6f065b2..f36d800 100644 --- a/src/client.ts +++ b/src/client.ts @@ -316,7 +316,7 @@ class Client { 'x-sdk-name': 'Web', 'x-sdk-platform': 'client', 'x-sdk-language': 'web', - 'x-sdk-version': '18.1.0', + 'x-sdk-version': '18.1.1', 'X-Appwrite-Response-Format': '1.7.0', }; @@ -638,9 +638,12 @@ class Client { let options: RequestInit = { method, headers, - credentials: 'include', }; + if (headers['X-Appwrite-Dev-Key'] === undefined) { + options.credentials = 'include'; + } + if (method === 'GET') { for (const [key, value] of Object.entries(Client.flatten(params))) { url.searchParams.append(key, value);