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

CORS test inverted in v2 #58

Closed
AlfredJKwack opened this issue Feb 7, 2019 · 1 comment
Closed

CORS test inverted in v2 #58

AlfredJKwack opened this issue Feb 7, 2019 · 1 comment

Comments

@AlfredJKwack
Copy link
Collaborator

Hi,

Functionally, what is the difference between the following two?

TS code from v2

  if (src.startsWith('data')) img.crossOrigin = 'Anonymous'

and

JS code from v1

    if ( imgSrc.substring(0,5) !== 'data:' )
      imgObj.crossOrigin = "Anonymous";

Unless I'm mistaken - which to be honest is quite possible after a long day's work - Version 2 of RGBaster has inverted the test for CORS handling of data url's.

@briangonzalez
Copy link
Owner

Oh snap, you're right!

AlfredJKwack pushed a commit that referenced this issue Feb 8, 2019
CORS test got inverted in v2. The point is to add CORS Anon when the source is not a data string.
briangonzalez pushed a commit that referenced this issue Feb 9, 2019
CORS test got inverted in v2. The point is to add CORS Anon when the source is not a data string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants