/bandwidth-hero-proxy

Primary LanguageJavaScriptMIT LicenseMIT

Bandwidth Hero Data Compression Service

Serverless port of Bandwidth Hero Data Compression Service 🚀.

Deploy your own functions in less than a minute, read the #Deployment section.

एक मिनट से भी कम समय में इसे deploy करें , उस के लिए #Deployment अनुभाग पढ़ें।

Currently using Netlify functions, which has a genorous limit of calls you can make, mostly enough for personal use, or small scale use, for faster and much more users, a dedicated server (code on original repo) maybe preferable :D

The original and this fork, both are, data compression service used by Bandwidth Hero browser extension. It compresses (optionally grayscale) given image to low-res WebP or JPEG image.

It downloads original image and transforms it with Sharp on the fly without saving images on disk.

Benefits - It's faster for initial requests, as it doesn't require restarting a sleeping heroku server deployment, also, you may benefit from a better ping (in my case it is such)

Note: It downloads images on user's behalf (By passing in same headers to the domain with required image), passing cookies and user's IP address through to the origin host.

Deployment

I can't provide you with my deployment, since I have the free tier, and that has it's limits.

You need to deploy the functions to Netlify:

Deploy

Then, in the Data Compression Service in Bandwidth Hero extension, add https://your-netlify-domain.netlify.app/api/index, and you are good to go.