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
- Appwrite Auth & Function don't reveal cl...
When I execute a function or sign in with my Flutter app, Appwrite does not show my real IP: instead, it seems that Appwrite shows Fastly CDN IP address.
- Why does this happen?
`AppwriteException: general_argument_invalid, Invalid `secret` param: Value must be a valid string and at least 1 chars and no longer than 256 chars (400)` the...
- Selfhosted starter python function retur...
I am running a selfhosted appwrite instance. Creating a node function and executing it works just fine but when i try to execute a python starter function, i ge...