wsgi as functionsapp var
This commit is contained in:
Родитель
8c56e0418a
Коммит
69407c1e79
|
@ -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',
|
||||
|
|
Загрузка…
Ссылка в новой задаче