TrackerNetwork / TRN.Developers

Information and Issue Tracker for the Tracker Network API.
https://tracker.gg/developers
24 stars 5 forks source link

Error when sending GET request for CS:GO API #11

Closed GrashGarrett closed 4 years ago

GrashGarrett commented 4 years ago

`<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous">

` I keep getting this error when using this jquery to take data from the api: (API is just a placeholder so I don't post my key online) > Access to XMLHttpRequest at 'https://public-api.tracker.gg/v2/APItest.php:1csgo/standard/profile/steam/76561198008049283' from origin 'http://foothillertech.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'https://tracker.gg' that is not equal to the supplied origin.
lwansbrough commented 4 years ago

Our API currently doesn't support cross-origin requests. This means you'll have to proxy your requests through a web server. (This is also a good idea in order to keep your API key private.)