Преглед на файлове

Flask: bypass when response is already a flask.Response

Bastien Sevajol преди 6 години
родител
ревизия
aff55596f6
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      hapic/ext/flask/context.py

+ 1 - 1
hapic/ext/flask/context.py Целия файл

@@ -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)