Skip to content

Commit 3d26e1e

Browse files
committed
Use hack in place of patch to ring-adapter-jetty
1 parent 8107ca8 commit 3d26e1e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/ring_spring_security/core.clj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,14 @@
9090
(boot-spring server handler nil)))
9191

9292
(defn boot [join?]
93-
(jetty/run-jetty #'app
93+
(let [server (jetty/run-jetty #'app
9494
{:port 9090
9595
:join? join?
96-
:configurator (fn [server] (boot-spring server #'app "classpath:security.xml"))
97-
:default-handler? false}))
96+
:configurator (fn [server]
97+
(boot-spring server #'app "classpath:security.xml"))})]
98+
;this is a hack to get around the handler ring-adapter-jetty forces on us
99+
(doseq [handler (remove #(= (class %) org.mortbay.jetty.servlet.Context) (seq (.getHandlers server)))]
100+
(.removeHandler server handler))))
98101

99102
(comment
100103
(def jetty (boot true))

0 commit comments

Comments
 (0)