Hi, recently I switched to new SDK and i see many CORS errors, I saw YT video about solving CORS problems and moving to cloud functions but I cannot see how to use new SDK:
like normally was getting token price:
const price = await Moralis.Web3API.token.getTokenPrice(options);
now get error:
Access to XMLHttpRequest at ‘https://yr9arcyilvx1.moralisweb3.com:2053/server/functions/getTokenPrice’ from origin ‘http://localhost:1234’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
RESTController.js:309 POST https://yr9arcyilvx1.moralisweb3.com:2053/server/functions/getTokenPrice net::ERR_FAILED
Can you explain this to me?