This library provides proxy middleware using express for html2canvas.
For html2canvas >=v1.0.0 use >= v1.0.0 of this library.
npm install html2canvas-proxy --save
var proxy = require('html2canvas-proxy');
var express = require('express');
var app = express();
app.use('/', proxy());
In HTML2Canvas do not use these configuration options (or set them to false):
- allowTaint
- useCors
You should use this HTML2Canvas option:
- proxy: '/'
('/' should be replaced with whatever url you used as your proxy url - see Example above)
You can check if your proxy is set up correctly like this:
You should replace http://localhost/ with your own.