I've created an app that will pull deals from an api into the app, and display a map on the site showing the users location. It works fine in the browser, but doesn't work when it is deployed to heroku. Here is the error message: XMLHttpRequest cannot load https://api.sqoot.com/v2/deals?api_key=fflt53&location=?07081&action=query.location&list=search&format=json. The 'Access-Control-Allow-Origin' header contains the invalid value 'null'. Origin 'https://immense-forest-3648.herokuapp.com' is therefore not allowed access. deal.js:116 Object
Asked
Active
Viewed 124 times
1 Answers
0
Add HTTP header Access-Control-Allow-Origin: *
or Access-Control-Allow-Origin: https://api.sqoot.com/
to response of your application.

t_yamo
- 781
- 1
- 12
- 21
-
refs. http://stackoverflow.com/questions/10636611/how-does-access-control-allow-origin-header-work – t_yamo Jan 04 '16 at 23:01