Skip to content

Instantly share code, notes, and snippets.

@jcromartie
Created July 26, 2011 14:16
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 jcromartie/db4d99bbec37ca8a0f5d to your computer and use it in GitHub Desktop.
Save jcromartie/db4d99bbec37ca8a0f5d to your computer and use it in GitHub Desktop.
(defn with-inspector
[handler]
(fn [{addr :remote-addr
{inspect? :inspect} :params
:as req}]
(when (and (= "127.0.0.1" addr) inspect?)
(clojure.inspector/inspect-tree req))
(handler req)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment