Concept Flow - Trusted host middleware
Request Received
Check Host Header
Is Host in Trusted List?
No→Reject Request (400)
Yes
Pass Request to App
Response Sent
The middleware checks the request's Host header against a trusted list. If trusted, it passes the request to the app; otherwise, it rejects it.