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

External scripts without the necessary Access-Control-Allow-Origin header are rejected in karma v1.1.1 #2249

Closed
dotch opened this issue Jul 12, 2016 · 2 comments

Comments

@dotch
Copy link
Contributor

dotch commented Jul 12, 2016

Expected behavior

External scripts can be loaded regardless of the Access-Control-Allow-Origin headers.

Actual behavior

External scripts without the necessary Access-Control-Allow-Origin header are rejected with:

Script from origin '...' has been blocked from loading by 
Cross-Origin Resource Sharing policy: 
No 'Access-Control-Allow-Origin' header is present on the 
requested resource. Origin '...' is therefore not allowed access.

This happens with Karma v1.1.1 when external scripts are served without the necessary Access-Control-Allow-Origin header.
In Karma v1.1.0 the scripts were loaded. This change in behavior is due to 5690ffe

Sometimes users might not have control over the external scripts they need to include in their test run. An option to turn off the new default behavior might be sensible.

Enviroment Details

  • Karma version (output of karma --version): v1.1.1
  • A modern browser that respects crossorigin="anonymous"
@frnk94
Copy link

frnk94 commented Aug 10, 2016

Since: #2219

@maksimr
Copy link
Contributor

maksimr commented Dec 1, 2016

Already fixed in PR #2318

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants