I am trying to invoke a function from the client and initially the request is received the and the function begins execution, however after about 20 seconds I get CORS error :
Access to XMLHttpRequest at 'https://server/v1/functions/650a084ca71f8e6092d9/executions' from origin 'https://client' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
so far I have checked that the function id is correct, the domain is set in the platforms tab and I also included the header 'Access-Control-Allow-Origin': '*'
but none worked.
I tested requesting the function from localhost and from a deployed site but they both return the same error.
I also included a screenshot of chromes network tab
Is the project id in the request header? What are the permissions on the function?
The funtction permission is set to any
, and no I didn't include the project id manually, is this the header you are referring to X-Appwrite-Project
?
Recommended threads
- delete document problems
i don't know what's going on but i get an attribute "tournamentid" not found in the collection when i try to delet the document... but this is just the document...
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here 🙂 I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...