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

The JavaScript SDK needs to be served with access-control-allow-origin: * #42

Open
thomasthiriez opened this issue Mar 24, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@thomasthiriez
Copy link

Title: The JavaScript SDK needs to be served with access-control-allow-origin: *

Endpoint(s):

  • GET https://connect.soundcloud.com/sdk/sdk-3.0.0.js

Scope(s):

  • None

Steps to reproduce:

Serve a page containing this:

<!DOCTYPE html>
<html>
  <head>
    <script src="https://connect.soundcloud.com/sdk/sdk-3.0.0.js"></script>
  </head>
  <body>
  </body>
</html>

With this HTTP header:

Cross-Origin-Embedder-Policy: require-corp

Expected behaviour:

The JavaScript sdk should load, and a window.SC object be present.

Actual behaviour:

The SoundCloud SDK fails to load with this error in the console:

GET https://connect.soundcloud.com/sdk/sdk-3.0.0.js net::ERR_BLOCKED_BY_RESPONSE

And with this status in the network tab:

(blocked:NotSameOriginAfterDefaultedToSameOriginByCoep)

The sdk.js file needs to be served with this header in order to load in presence of the COEP header:

access-control-allow-origin: *

@rahul-sc rahul-sc added the bug Something isn't working label Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants