I'm trying to fetch all the Steam apps using the Steam API.
JavaScript:
var previewUrl =
"http://api.steampowered.com/ISteamApps/GetAppList/v0002/?key=mysteamkey&format=json";
$.ajax({
type: 'GET',
url: previewUrl,
success: function(data) {
console.log(data);
},
error: function(e) {
console.log(e.message);
}
});
But it gets me this error on console:
Access to XMLHttpRequest at 'http://api.steampowered.com/ISteamApps/GetAppList/v2/?key=mysteamkey&format=json' from origin 'http://localhost:5000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.