> [!WARNING] > API that relies on the [Host header](https://developer.mozilla.org/docs/Web/HTTP/Headers/Host), such as and , are subject to potential spoofing by clients. > > To prevent host and port spoofing, use one of the following approaches: > > * Use () where the ports are checked. > * Employ [Host filtering](xref:fundamentals/servers/kestrel/host-filtering).