I have two after_request handlers. In my case, I need one to fire before the next.
@app.after_request
def after_request_check_something(response):
# do something
return response
@app.after_request
def after_request_compress(response):
# do something
return response
In my case, I want compress to go first, then check_something. But they are firing in reverse.
If it matters, in my actual code, these two handlers are not consecutively declared like this. They are each in different modules that are installed at different times.
How can I control the order of execution?