Skip to content

Instantly share code, notes, and snippets.

@pr4v33n
Created July 4, 2011 17:33
Show Gist options
  • Save pr4v33n/1063664 to your computer and use it in GitHub Desktop.
Save pr4v33n/1063664 to your computer and use it in GitHub Desktop.
Middleware
(03:47:50 PM) h0x5f3759df: Hi, is there any way for me to pass info from my app to my custom middleware?
(04:19:03 PM) mitsuhiko: h0x5f3759df: hard
(04:19:10 PM) mitsuhiko: h0x5f3759df: what does the middleware do?
(04:19:24 PM) h0x5f3759df: It does some profiling
(04:19:34 PM) h0x5f3759df: I want to restrict the profiling to a subset of users
(04:19:39 PM) h0x5f3759df: *admins
(04:20:43 PM) mitsuhiko: h0x5f3759df: the thing is that the middleware starts executing before the application does and stops afterwards
(04:20:49 PM) mitsuhiko: but at one point in the middle there will be the application
(04:30:57 PM) mitsuhiko: h0x5f3759df: i would probably try not doing that in the middleware :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment