Created
January 8, 2011 19:30
-
-
Save mirrormatch/771078 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; The middleware takes 'app' as its parameter. In this | |
;; context app is going to be either another middleware | |
;; or the route handler. | |
;; | |
;; The return value is a new function that does the | |
;; processing you need and continues the middleware | |
;; chain. | |
(defn my-middleware [app] | |
(fn [request] | |
;; This is where you'd do any processing on the request | |
;; Finally, keep the chain going by calling app | |
(app request))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment