Selaa lähdekoodia

Flask: bypass when response is already a flask.Response

Bastien Sevajol 6 vuotta sitten
vanhempi
commit
aff55596f6
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      hapic/ext/flask/context.py

+ 1 - 1
hapic/ext/flask/context.py Näytä tiedosto

@@ -106,4 +106,4 @@ class FlaskContext(ContextInterface):
106 106
         return FLASK_RE_PATH_URL.sub(r'{\1}', contextualised_rule)
107 107
 
108 108
     def by_pass_output_wrapping(self, response: typing.Any) -> bool:
109
-        return False
109
+        return isinstance(response, Response)