简体   繁体   中英

How to enable Gzip on http-kit for minified ClojureScript?

My Clojure application is deployed on Heroku along with a minified 600KB+ ClojureScript JS artifact that I'm serving as a static file at /js/main.js .

How do I enable gzip compression on http-kit to reduce the size of my JS artifact over the wire?

Not supported by http-kit, usually you want to use a proxy like Nginx anyways. As you probably don't have that option with Heroku you can do the compression via ring middleware, see this issue for pointers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM