Minify
I have a html page stored in a database. I want to minify it before sending it back. Tried varios libs but they won't work with cloudflare. Is there a way to minify a js/css response before sending it back?
6 Replies
Why not just turn on the built-in minification?
https://dash.cloudflare.com/?to=/:account/:zone/speed/optimization then scroll down a bit to Auto Minify
@zegevlier because its used as a api / proxy for non cloudflare managed zones/domains
If a zone can run Workers, then it can also run the Minifier
the worker is called by a different cdn 😉
That shouldn’t matter. If a request hits a Worker(and it’s on a custom domain), then you can use Auto-Minify
Aaah. Got it! Thanks!