Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LB-439: Allow cross-origin requests for playing now and listens api endpoints #566

Merged
merged 1 commit into from Apr 1, 2019

Conversation

Projects
None yet
3 participants
@bluefantail
Copy link
Contributor

bluefantail commented Mar 22, 2019

Summary

  • This is a…

    • ( ) Bug fix
    • ( ) Feature addition
    • ( ) Refactoring
    • ( ) Minor / simple change (like a typo)
    • (x) Other
  • Describe this change in 1-2 sentences: Enables cross-origin requests for two API endpoints so requests can be made to retrieve basic user activity like recent listen info via the browser / javascript.

Problem

It's currently not possible for a website to make a request to any of the endpoints that get data about a users current or recent listens, as a cross-origin request error is thrown in the console (even though it's possible in other non-browser based applications).

Solution

As the GET endpoints don't use any authorisation, this change adds @crossdomain() (used in a few other places already) to listens and playing-now, allowing cross-origin requests from all domains.

@mayhem

mayhem approved these changes Mar 27, 2019

Copy link
Member

mayhem left a comment

Not sure why they didn't have this before, but it makes sense to me. Thanks for the PR!

@bluefantail

This comment has been minimized.

Copy link
Contributor Author

bluefantail commented Mar 27, 2019

Not sure why they didn't have this before, but it makes sense to me. Thanks for the PR!

No problem!

@paramsingh paramsingh merged commit b9bcc2d into metabrainz:master Apr 1, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@bluefantail bluefantail deleted the bluefantail:lb-439 branch Apr 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.