Create a basic svelte app and create a client pointing at the local version of appwrite.
Create a project and add the web platform with the hostname as localhost. (NOTE: This happens when the hostname is a wildcard *)
<script lang="ts">
import { Client, Account, ID } from 'appwrite';
import { onMount } from 'svelte';
const client = new Client().setEndpoint('http://localhost/v1').setProject('<project id>')
const account = new Account(client);
onMount(async () => {
const user = await account.get();
console.log(user);
})
</script>
<div>App</div>
๐ Expected behavior
The account.get() call should return the currently logged in user if any.
๐ Actual Behavior
The request fails with a CORS error related to the x-sdk-language header.
๐ฒ Appwrite version
Version 0.10.x
๐ป Operating system
MacOS
๐งฑ Your Environment
No response
๐ Have you spent some time to check if this issue has been raised before?
๐ Reproduction steps
Create a basic svelte app and create a client pointing at the local version of appwrite. Create a project and add the web platform with the hostname as
localhost
. (NOTE: This happens when the hostname is a wildcard*
)๐ Expected behavior
The
account.get()
call should return the currently logged in user if any.๐ Actual Behavior
The request fails with a CORS error related to the
x-sdk-language
header.๐ฒ Appwrite version
Version 0.10.x
๐ป Operating system
MacOS
๐งฑ Your Environment
No response
๐ Have you spent some time to check if this issue has been raised before?
๐ข Have you read the Code of Conduct?