hypercorn.middleware package

Module contents

class hypercorn.middleware.AsyncioWSGIMiddleware(wsgi_app: Callable[[dict, Callable], Iterable[bytes]], max_body_size: int = 65536)

Bases: hypercorn.middleware.wsgi._WSGIMiddleware

hypercorn.middleware.DispatcherMiddleware

alias of hypercorn.middleware.dispatcher.AsyncioDispatcherMiddleware

class hypercorn.middleware.HTTPToHTTPSRedirectMiddleware(app: Union[Type[hypercorn.typing.ASGI2Protocol], Callable[[Union[hypercorn.typing.HTTPScope, hypercorn.typing.WebsocketScope, hypercorn.typing.LifespanScope], Callable[], Awaitable[Union[hypercorn.typing.HTTPRequestEvent, hypercorn.typing.HTTPDisconnectEvent, hypercorn.typing.WebsocketConnectEvent, hypercorn.typing.WebsocketReceiveEvent, hypercorn.typing.WebsocketDisconnectEvent, hypercorn.typing.LifespanStartupEvent, hypercorn.typing.LifespanShutdownEvent]]], Callable[[Union[hypercorn.typing.HTTPResponseStartEvent, hypercorn.typing.HTTPResponseBodyEvent, hypercorn.typing.HTTPServerPushEvent, hypercorn.typing.HTTPDisconnectEvent, hypercorn.typing.WebsocketAcceptEvent, hypercorn.typing.WebsocketSendEvent, hypercorn.typing.WebsocketResponseStartEvent, hypercorn.typing.WebsocketResponseBodyEvent, hypercorn.typing.WebsocketCloseEvent, hypercorn.typing.LifespanStartupCompleteEvent, hypercorn.typing.LifespanStartupFailedEvent, hypercorn.typing.LifespanShutdownCompleteEvent, hypercorn.typing.LifespanShutdownFailedEvent]], Awaitable[None]]], Awaitable[None]]], host: Optional[str])

Bases: object

class hypercorn.middleware.TrioWSGIMiddleware(wsgi_app: Callable[[dict, Callable], Iterable[bytes]], max_body_size: int = 65536)

Bases: hypercorn.middleware.wsgi._WSGIMiddleware