Hey
Our company is testing Moralis out for the game we releasing soon.
However we encoutering issues doing the tests. We setup a server correctly however while testing it looks like the server have CORS blocked - which is odd since i’d never be hosting the website in the same place the Moralis server is.
This is my request headers:
Accept: application/json, text/plain, */*
Access-Control-Allow-Origin: *
Referer: http://localhost:8080/
sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="99", "Google Chrome";v="99"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "macOS"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36
X-API-Key: <secret api key>
Error:
Access to XMLHttpRequest at 'https://ndhgwzieszb8.usemoralis.com:2053/server/0x7Ac410F4E36873022b57821D7a8EB3D7513C045a/nft' from origin 'http://localhost:8080' has been blocked by CORS policy: Request header field access-control-allow-origin is not allowed by Access-Control-Allow-Headers in preflight response.
xhr.js:187 GET https://ndhgwzieszb8.usemoralis.com:2053/server/0x7Ac410F4E36873022b57821D7a8EB3D7513C045a/nft net::ERR_FAILED
I have CORS enabled in my browser and in the website via meta tags - also adding Access-Control-Allow-Origin
header but it seems not working. Is there something being missed here ?
Thanks !