New here and Im just setting up my first cloud function to perform a simple save to the database but I seem to be getting the follow error
Access to XMLHttpRequest at âhttps://owexnxuzf2ev.usemoralis.com:2053/server/functions/createAvatarâ from origin âhttp://localhost:3000â has been blocked by CORS policy: Response to preflight request doesnât pass access control check: No âAccess-Control-Allow-Originâ header is present on the requested resource.
const logger = Moralis.Cloud.getLogger();
logger.info("Request coming 6: " + JSON.stringify(request));
// logger.info("User : " + JSON.stringify(user));
request.user.set("username", "new_usernname");
await user.save();
return user;
As soon as I enable the save function I get this error
The server is brand new ganache and I have set up hardhat for my localchain