-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix: Add crossorigin attribute to script HTML tags #2219
fix: Add crossorigin attribute to script HTML tags #2219
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
Thanks for this. Can you please change the commit message to follow our convention |
Sure thing, let me try that. |
79a6d69
to
4ef7c7a
Compare
@dignifiedquire updated |
Hmm, I see errors in tests. I'll take a look |
4ef7c7a
to
93c03fc
Compare
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
93c03fc
to
edbe99a
Compare
CLAs look good, thanks! |
edbe99a
to
39f43c1
Compare
I've updated the unit tests I still haven't figured out how to update the e2e tests for |
Looks like all checks passed. |
Thanks, just one last thing can you squash the two commits into one? |
39f43c1
to
a0efd42
Compare
The Problem: When an error occurs in a script that is not served by the default server spawned by karma, the stack trace gets lost and only the message "Script Error" is captured and reported back. This makes it hard to pin-point where the error originated from. The Solution: Add "crossorigin" attribute to generated script tags. Solution is inspired by this article: https://blog.getsentry.com/2016/05/17/what-is-script-error.html Other: Update middleware unit test
a0efd42
to
5690ffe
Compare
Done, lets wait for the tests to run again. I've also rebased my branch. |
Thanks |
My pleasure 👍 |
In retrospect, this "bug fix" released in a patch version (v1.1.1) is in fact an entirely new restriction that is imho considered a breaking change. Anyone using Karma with one of the test files served from another server needs to add This happens to coincide with regression fix #2220 for litixsoft/karma-mocha-reporter#67. Upgrading to v1.1.1 fixed that but then broke everything else. The only way to get it fixed was to update directly to v1.4.0. This could've been avoided if the option was disabled by default and kept opt-in until a later semver-minor or semver-major release. Alternatively, it would've been avoided if it was supported to have Karma serve one of |
The Problem
When an error occurs in a script that is not served by the
default server spawned by karma, the stack trace gets lost and
only the message
"Script Error"
is captured and reported back.This makes it hard to pin-point where the error originated from.
The Solution
Add
crossorigin
attribute to generated script tags.Solution is inspired by this article:
https://blog.getsentry.com/2016/05/17/what-is-script-error.html