title: Cross Origin with KineticJS
body: <p>I have images hosted on a server, and the KineticJS app running on another server. </p>
  
  <p><strong>Problem:</strong> When attempting <code>stage.toDataURL()</code>, I get the CORS error:</p>
  
  <pre><code>Uncaught Error: SECURITY_ERR: DOM Exception 18 
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Frcxn.jpg" alt="enter image description here"></p>
  
  <p>I have adjusted Apache to allow CORS</p>
  
  <pre><code>Header set Access-Control-Allow-Origin "*"
  Header set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept"
  Header set Access-Control-Allow-Methods "GET, PUT, POST, DELETE"
  </code></pre>
  
  <p>When the image is CURLed, I get</p>
  
  <pre><code>HTTP/1.1 200 OK
  Date: Sat, 26 Jan 2013 21:29:35 GMT
  Server: Apache
  Last-Modified: Sat, 26 Jan 2013 21:27:19 GMT
  Accept-Ranges: bytes
  Content-Length: 166812
  Access-Control-Allow-Origin: *
  Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
  Access-Control-Allow-Methods: GET, PUT, POST, DELETE
  Content-Type: image/jpeg
  </code></pre>
  
  <p>However the <code>SECURITY_ERR</code> error still occurs!</p>
  
  <p>Is there another step necessary to perform <code>.toDataURL()</code> with images from another domain, maybe using a cross-origin tag?</p>