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
- Synchronous function execution timeout w...
I am calling server functions with xasync = true and I still get this error message. Synchronous function execution timed out. Use asynchronous execution inste...
- Problem with Google Workspace at DNS Rec...
Hello, I bought a domain at Namecheap, and Google Workspace used to work there, but now that I switched from Custom DNS to Appwrite's nameservers, it doesn't w...
- Function running for more than 2 hours i...
This is my projectID: 669fe01b003800dd0503 Cloud functionID is 696ea05400147eb8eb3b I hope this doesn't count against my GB-hours?