Skip to content

Instantly share code, notes, and snippets.

@misfo
Created December 21, 2011 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save misfo/1506329 to your computer and use it in GitHub Desktop.
Save misfo/1506329 to your computer and use it in GitHub Desktop.
wrap-session not working in a nested Moustache app
(ns tache-middlewares.core
(:use [net.cgrand.moustache]
[ring.handler.dump]
[ring.middleware.session]))
(def handler (app
["supa" &] (app
wrap-session
["set"] (fn [req] {:status 200, :body "set", :session {:thing 1}})
["dump"] handle-dump)))
(ns tache-middlewares.core
(:use [net.cgrand.moustache]
[ring.handler.dump]
[ring.middleware.session]))
(def handler (app
wrap-session
["supa" &] (app
["set"] (fn [req] {:status 200, :body "set", :session {:thing 1}})
["dump"] handle-dump)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment