Cross-Origin Request Blocked with spotify search in Firefox
See original GitHub issueDescribe the bug When I search in Firefox for something in spotify, it fails to load and gives CORS errors.
To Reproduce Steps to reproduce the behavior:
- Activate Mopidy and Spotify
- Go to Iris in a new version of firefox and search on spotify
- Check the web developer console
- See error
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.spotify.com/v1/search?
Expected behavior It should just search spotify as usual and return results.
Screenshots If applicable, add screenshots to help explain your problem.
Environment details:
- OS: Ubuntu Linux 20.04
- Browser: Firefox 80.0.1 (64-bit)
- Iris version: 3.51.0
Additional context The mopidy http server allows setting allowed_origins and I have this set to:
[http]
hostname = ::
allowed_origins = api.spotify.com:443,
Have tried various versions of this but none seem to work.
Works on Chrome. I think Firefox is just more serious about enforcing this?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Firefox appears to be blocking Cross Origins Requests so ...
Firefox appears to be blocking Cross Origins Requests so cannot actually successfully sign-in: Cross-Origin Request Blocked: The Same Origin ...
Read more >Firefox 'Cross-Origin Request Blocked' despite headers [closed]
I came across this question having found requests in Firefox were being blocked with the message: Reason: CORS request did not succeed.
Read more >Certain websites won't load at all in Firefox, but work fine in ...
Hello,. since the recent update to version 90.0 I noticed that certain websites (youtube, facebook, spotify) won't load at all.
Read more >Cross-Origin Request Blocked with spotify API
Cross-Origin Request Blocked : The Same Origin Policy disallows reading the remote resource at https://accounts.spotify.com/authorize?
Read more >Thanks, IE. - ayulin.net
Screenshot of Firefox Aurora JS Console showing a Cross-Origin Request Blocked error. The good old Cross-Origin Request Blocked.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For those who also bumped into this issue, even after explicitly adding
api.spotify.com
to:allowed_origins
: the culprit in my case was the Privacy Badger extension. It interprets the cross-domain call toapi.spotify.com
like a tracker, so it blocks it regardless of the CORS configuration. Adding a domain exception for the Iris server fixed the issue for me.I tried various urls and kept seeing the same issue. Finally I tried with add-ons disabled and it worked. I have lots of privacy add-ons and though I tried disabling them for this site and still saw the issue, disabling them all completely fixes it. So it’s not Iris, it’s me.
Closing as invalid. Thanks for your help!