background-check icon indicating copy to clipboard operation
background-check copied to clipboard

CORS issue - possibly with CDN provider?

Open ohNegative opened this issue 9 years ago • 2 comments

I have a static site that I'm hosting with Netlify (http://copy-writer-otter-74032.netlify.com/). I was running it on my local WAMP server without any issues, in any browser. Once I deployed my site to their servers, I got 6 errors, all related to CORS:

Uncaught SecurityError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data.

I'm bringing this up to say I'm pretty sure its NOT your script, but I'm guessing there might be an issue if you use your script with a CDN provider? I'm guessing this is why it works fine on my local WAMP server, but on a CDN provider, the images are seen as coming from a foreign origin so browsers suddenly freak out and throw the errors I was seeing above?

I have a ticket in with Netlify to see what they can determine and will keep you posted. I looked through the current issues here, and although there are two tickets regarding CORS, neither had my same issue.

Let me know if you have any experience with similar problems.

P

ohNegative avatar Oct 29 '15 05:10 ohNegative

Have you found a solution to this?

I'm having this same problem currently.

indfnzo avatar Aug 25 '16 15:08 indfnzo

There's a PR fixing this. #60

rodolfogordo10 avatar Dec 15 '16 18:12 rodolfogordo10