This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-18
Channels
- # announcements (2)
- # aws (3)
- # beginners (35)
- # boot (10)
- # cider (33)
- # cljs-dev (22)
- # clojure (58)
- # clojure-belgium (1)
- # clojure-europe (8)
- # clojure-houston (1)
- # clojure-italy (47)
- # clojure-nl (2)
- # clojure-spec (4)
- # clojure-uk (39)
- # clojurescript (12)
- # cursive (18)
- # data-science (1)
- # datomic (2)
- # emacs (24)
- # figwheel-main (29)
- # fulcro (24)
- # hoplon (14)
- # juxt (6)
- # kaocha (3)
- # nrepl (6)
- # off-topic (64)
- # om (1)
- # om-next (1)
- # pathom (21)
- # pedestal (18)
- # planck (40)
- # protorepl (1)
- # re-frame (15)
- # reagent (7)
- # reitit (16)
- # shadow-cljs (184)
- # spacemacs (4)
- # test-check (33)
Hello
I'm using context-configurator
to enable gzip
, but it works just on "public" routes.
I use csrf
, so my get
's are public and post
's private
::http/enable-csrf {}
::http/enable-session {}
On get's, gzip works, on post's not
My context config:
(defn context-configurator
[^ServletContextHandler context]
(let [gzip-handler (GzipHandler.)]
(.setExcludedAgentPatterns gzip-handler (make-array String 0))
(.setGzipHandler context gzip-handler))
context)
https://github.com/pedestal/pedestal/blob/master/samples/servlet-filters-gzip/src/gzip/service.clj#L61Hm, I’d expect that to behave similarly. I’d explore that further. If you have a minimal project reproducing the issue that would help.
👍 5
I don’t know. I don’t understand why csrf would interfere with compression and my gut feeling is that it’s a red herring
👍 5
includedMethods
List of HTTP methods to compress. If not set, only GET requests are compressed.
Nice!
Working with (.addIncludedMethods gzip-handler (into-array ["GET" "POST"]))
Should I do a PR to add a comment with this link in the example? or you can add?
Thanks @U0FL657GR 😉 My POST respose goes from 5M to 300K