is there a speicifc way to execute ,request a function?
The project doesn't seems to be blocked, I think?
Just CORS not set
i resolveed the cors issue now its block, here is the code of function:
// This Appwrite function will be executed every time your function is triggered export default async ({ req, res, log, error }) => {
// Handle preflight (OPTIONS) requests for CORS
if (req.method === 'OPTIONS') {
return res.send('', 204, {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, POST, OPTIONS',
'Access-Control-Allow-Headers': 'Content-Type, Authorization, X-Appwrite-Key'
});
}
return res.json({ motto: "HELLO CORS!" }, 200, { "Access-Control-Allow-Origin": "*", }); };
Recommended threads
- Creating A User Account
I have a simple form component that is expected to create a new user using the the ###firstName, ###lastName, ###username, and ###password from a react-hook-for...
- project block by using functions
i just revieved this email because my project got block,but still i dont know why it happend
- How should I handle my errors?
I followed the following guide to setup a simple project with authentication: https://appwrite.io/docs/tutorials/nextjs-ssr-auth/step-1 And Kenny gave me the mi...