Reliable accessing of request params in middleware