Fork me on GitHub
#clojure
<
2022-06-07
>
Adam Kalisz16:06:04

What is the preferred ring-gzip wrapper? https://github.com/bertrandk/ring-gzip or https://github.com/clj-commons/ring-gzip-middleware or even something else? Are there any "gotchas"?

delaguardo17:06:22

I would recommend configuring compression in the frontend (nginx, traefik etc) they are all capable of doing that.

1
Adam Kalisz16:06:39

Ok, thanks I will explore that.

djeis19:06:25

Is there a strategy for making uberjars that don't include certain transitive dependencies? I have a provided dependency (javax.servlet-api), I've already separated it out as its own alias so I'm not directly pulling it in when I uberjar but I was just bitten by it being pulled in as a transitive dependency of one of my primary deps (ring-defaults). For now I've made it an exclusion of that dependency, but I wonder if there's a more general strategy for making sure that javax.servlet-api doesn't end up in my uberjar?

Alex Miller (Clojure team)19:06:10

you can use the :exclude option in the uber task (https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-uber) to exclude the dir containing those classes, I think that should work

Alex Miller (Clojure team)19:06:47

:exclude ["javax/servlet/.*"] ?

djeis19:06:14

Ah, yea, I figure that would do it thanks!