allowed_hosts¶
- class litestar.middleware.allowed_hosts.AllowedHostsMiddleware¶
Bases:
ASGIMiddleware
Middleware ensuring the host of a request originated in a trusted host.
- __init__(config: AllowedHostsConfig) None ¶
Initialize
AllowedHostsMiddleware
.- Parameters:
config¶ – An instance of AllowedHostsConfig.