@SDS API Cors Policy Issues
-
dubiouscentaurwrote on Mar 25, 2024, 8:58 PM last edited by dubiouscentaur_PSN Mar 26, 2024, 2:20 PM
hello - i'm trying to make a personal site to track some data from the api but i keep getting errors:
[Error] Origin http://localhost:4200 is not allowed by Access-Control-Allow-Origin. Status code: 200
[Error] XMLHttpRequest cannot load https://mlb24.theshow.com/apis/listing.json?uuid=xxxx due to access control checks.From my research it sounds like the api should be returning appropriate headers such as Access-Control-Allow-Origin: * but the show api returns none.
"The response headers show that the server is not including the Access-Control-Allow-Origin header, which is necessary for browsers to allow requests from different origins (such as your Angular application running on localhost:4200). Without this header, modern browsers will block the request due to CORS policy restrictions.
To resolve this issue, need to configure the server to include the Access-Control-Allow-Origin header in its responses."
-
anyone? i've looked into this a ton and it seems like a simple fix from the api end?
-
ok thanks for the reply.
-