flask request filter