зеркало из
1
0
Форкнуть 0
This commit is contained in:
peterstone2017 2022-02-14 12:24:35 -06:00
Родитель 8c56e0418a
Коммит 69407c1e79
1 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -137,8 +137,8 @@ class FunctionsApp:
self._auth_level = auth_level
if wsgi_app is not None:
wsgi_middleware = WsgiMiddleware(wsgi_app.wsgi_app)
self._flask(wsgi_app, wsgi_middleware, auth_level)
self._wsgi_middleware = WsgiMiddleware(wsgi_app.wsgi_app)
self._flask(wsgi_app, auth_level)
@property
def app_script_file(self):
@ -181,8 +181,7 @@ class FunctionsApp:
return wrap
def _flask(self, app, wsgi_middleware: WsgiMiddleware,
auth_level: Optional[AuthLevel] = None):
def _flask(self, app, auth_level: Optional[AuthLevel] = None):
methods = reduce(operator.or_,
[rule.methods for rule in
@ -192,7 +191,7 @@ class FunctionsApp:
@self.route(methods=methods, auth_level=auth_level, route="/{*route}")
def main(req: HttpRequest, context: Context) -> HttpResponse:
return wsgi_middleware.handle(req, context)
return self._wsgi_middleware.handle(req, context)
def route(self,
trigger_arg_name: str = 'req',