Wrap Flask.request and use @before_request