allowed_hosts#
- class starlite.middleware.allowed_hosts.AllowedHostsMiddleware#
Bases:
AbstractMiddleware
Middleware ensuring the host of a request originated in a trusted host.
- __init__(app: ASGIApp, config: AllowedHostsConfig)#
Initialize
AllowedHostsMiddleware
.- Parameters:
app – The
next
ASGI app to call.config – An instance of AllowedHostsConfig.