I'm writing my own Nginx HTTP module. I'm registering module's handler on two phases: NGX_HTTP_SERVER_REWRITE_PHASE
and NGX_HTTP_PREACCESS_PHASE
. The logic is pretty much the same on each phase therefore it's unnecessarily to make two different handler-functions, but the the logic is still slightly different depending on the phase on which the handler was called.
The question is if it available somehow to determine the phase on which the handler-function was called inside this handler-function?