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