0.2.0 • Published 5 years ago

svg-to-image-proxy v0.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

svg-to-image-proxy

version license build code style

Web function to generate PNGs from SVGs. Based on convert-svg-to-png which uses headless Chromium.

The proxy accepts a request for e.g. https://raster.example.com/example.png and translates it to a request for https://other-server.example.com/example.svg. If the path doesn't contain .png, it passes is unchanged, e.g. https://raster.example.com/example to https://other-server.example.com/example.

The query string is also forwarded upstream. Cache headers are forwarded downstream.

The host comes from the BASE_URL environment variable.

Designed for Shields though may be useful for other application as well.

Deployment

Runs on Zeit Now.

License

This project is licensed under the MIT license.