Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 1.41 KB

File metadata and controls

43 lines (27 loc) · 1.41 KB

html2canvas-proxy

Gitter Build Status NPM Downloads NPM Version

Express middleware proxy for html2canvas

This library provides proxy middleware using express for html2canvas.

For html2canvas >=v1.0.0 use >= v1.0.0 of this library.

Install

npm install html2canvas-proxy --save

Example

var proxy = require('html2canvas-proxy');
var express = require('express');

var app = express();
app.use('/', proxy());

Usage

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)

Testing

You can check if your proxy is set up correctly like this:

You should replace http://localhost/ with your own.