Skip to content

Commit

Permalink
fix issues:
Browse files Browse the repository at this point in the history
  • Loading branch information
seidnerj committed May 3, 2024
1 parent b85eb7a commit 4e1071b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions azure/functions/decorators/function_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2747,7 +2747,7 @@ class Blueprint(TriggerApi, BindingApi, SettingsApi):
pass


class ExternalHttpFunctionApp(FunctionRegister, TriggerApi, ABC):
class ExternalHttpFunctionApp(FunctionRegister, TriggerApi, BindingApi, SettingsApi, ABC):
"""Interface to extend for building third party http function apps."""

@abc.abstractmethod
Expand Down Expand Up @@ -2776,7 +2776,6 @@ def __init__(self, app,
"""
super().__init__(auth_level=http_auth_level)
self.middleware = AsgiMiddleware(app)
self._add_http_app(self.middleware)
self.startup_task_done = False

def __del__(self):
Expand All @@ -2802,7 +2801,7 @@ def _add_http_app(self,
@self.http_type(http_type='asgi')
@self.route(methods=(method for method in HttpMethod),
auth_level=self.auth_level,
route="/{*route}")
route="{*route}")
async def http_app_func(req: HttpRequest, context: Context):
if not self.startup_task_done:
success = await asgi_middleware.notify_startup()
Expand All @@ -2821,7 +2820,6 @@ def __init__(self, app,
:param app: wsgi app object.
"""
super().__init__(auth_level=http_auth_level)
self._add_http_app(WsgiMiddleware(app))

def _add_http_app(self,
http_middleware: Union[
Expand All @@ -2842,6 +2840,6 @@ def _add_http_app(self,
@self.http_type(http_type='wsgi')
@self.route(methods=(method for method in HttpMethod),
auth_level=self.auth_level,
route="/{*route}")
route="{*route}")
def http_app_func(req: HttpRequest, context: Context):
return wsgi_middleware.handle(req, context)

0 comments on commit 4e1071b

Please sign in to comment.