Hello everyone,
I’m having an issue with the CORS and don’t really know how to solve it as I’m not a ressource maker or what ever it’s called lol, so i’m doing a web app for a FiveM server and when I’m trying to access any of the .json files from ex.em.ple.ip:30120 I have a big Red Console Error saying :
Access to XMLHttpRequest at ‘https://ex.em.ple.ip:30120/info.json’ from origin ‘http://localhost:3000’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
So now I’m stuck not knowing how to access the “requested resource” to pass the header and all the previous posts that I have read couldn’t help.
And when trying to access the url with Insomnia, Postman or my browser it works… Heeelp
Hey !
Thanks for you reply I’ve been looking at it for hours nothing worked, untill this man came like an angel and gave me the answer thanks @TheIndra !!!
(How to fetch server info - #26 by TheIndra)
I changed his code a bit and put it in my website’s backend now it works and I don’t have cors issues anymore !