mysociety/node-connect-image-proxy — pull request #6 by typpo (2012-09-19 22:03:05+00:00)
Title: Added various options, https support

I refactored things into an ImageProxy class that you can use like so:

```
var myproxy = new ImageProxy({
validMimeTypes: ['image/png'],
hostsWhitelist: ['mysite.com', 'images.mysite.com'],
headers: {'Cache-Control': 'max-age=31536000'},
});

// mount the proxy at '/proxy'
app.use( '/proxy', myproxy.requestHandler );
```

We accept the following options:
* validMimeTypes - defaults to jpg/jpeg, png, gif
* hostsWhitelist - defaults to the same host only
* headers - default to no additional headers besides content-type

I also added support for proxying images over https.

I realize that these changes are not backwards compatible so I understand if you'd prefer to keep things the old way. I needed these features, so I went ahead and built them anyway. Thank you for starting this project!