Image resizing microservice
- Resize images
- As fast as possible
- Support both generic
width
/height
and oEmbedmaxwidth
/maxheight
- Basic abuse prevention
- Forward Referer to origin and CORS headers back
- Optional list of allowed hostnames to resize from
- MIME checking of requested image
npm run dev
uses nodemon & ts-node to run and restart on watches in a single commandnpm run build
&npm run start
can be used by Heroku buildpack-based pipelines
ALLOWED_HOSTNAMES
- comma-separated list of hostnames to allow (including port if applicable)PORT
- Port to run server on
- Caching; this should be done by another layer
- Caching headers from the origin should be passed back though
- TLS; this should be done by a proxy
This acts as a proxy and may enable access to internal IP ranges.
PLEASE use ALLOWED_HOSTNAMES
environment variable and configure your firewall correctly.