html2canvas-proxy icon indicating copy to clipboard operation
html2canvas-proxy copied to clipboard

How do I use html2canvas proxy

Open leonidas87 opened this issue 12 years ago • 1 comments

Hey,

So in html2canvas.js i set

            // preload options
            proxy: 'proxy.js',
            timeout: 0,    // no timeout
            useCORS: false, // try to load images as CORS (where available), before falling back to proxy
            allowTaint: false, //

And in proxy.js (node.js proxy) What do I set here

var url, http, request; url = require('url'); http = require('http'); request = require('request');

I am running on my local host and I am using html2canvas to capture cross-domain homepage screenshots.

I keep getting this error

html2canvas.js:359 2 Blocked a frame with origin "http://localhost" from accessing a frame with origin "http://money.rediff.com". Protocols, domains, and ports must match. html2canvas.js:359 Uncaught ReferenceError: require is not defined proxy.js:10 (anonymous function)

Please help.

leonidas87 avatar May 25 '13 16:05 leonidas87

Did you found a solution because I'm having the same question.

ledgerdary007 avatar Oct 31 '13 16:10 ledgerdary007