before_request functions not run before every request #291

jab opened this Issue Aug 2, 2011 · 2 comments


None yet

2 participants

jab commented Aug 2, 2011

I have a before_request function which I'd like to be actually run before every request. It sets some variables on g based on things like headers that I would like a custom error handler to be able to access. If I e.g. abort(404) from one of my own views, I'm fine, but if a request comes in that werkzeug can determine has no matching route, it bypasses my before_request function and goes straight to the error handler, so g is missing info.


I cannot reproduce that. Do you have a testcase?

@mitsuhiko mitsuhiko closed this Aug 4, 2011
jab commented Aug 4, 2011

D'oh, problem was on my end. Sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment