JohnnyTheTank / angular-footballdata-api-factory

AngularJS Factory for the football-data.org JSON REST API
MIT License
49 stars 20 forks source link

Cors issue #4

Open estellederrien opened 5 years ago

estellederrien commented 5 years ago

Hello,

I have correctly added the lib, this is my query ;

//Show one Season
    footballdataFactory.getSeason({
        id: '<SEASON_ID>',
        protocol: 'auto', // (optional) 'http', 'https', 'auto'
        apiKey: '4d5e1374b3df4071827db1e3ccd1af17', // Register for a free api key: http://api.football-data.org/register
    }).then(function (_data) {
        //on success
    }).catch(function (_data) {
        //on error
    });

I run into this error :

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://api.football-data.org/v1/soccerseasons/%3CSEASON_ID%3E?apiKey=4d5e1374b3df4071827db1e3ccd1af17. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).[Learn More]
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://api.football-data.org/v1/soccerseasons/%3CSEASON_ID%3E?apiKey=4d5e1374b3df4071827db1e3ccd1af17. (Reason: CORS request did not succeed).[Learn More]
Manuel-kl commented 1 year ago

I am getting the same error If you found a solution, I'll appreciate if you share