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