Skip to content
DocsTry Aspire
DocsTry

YarpRoute.withMatchHosts

Method
📦 Aspire.Hosting.Yarp v13.4.0
interface YarpRoute {
// ... omitted for brevity
withMatchHosts(hosts: string[]): YarpRoute;
}

Signature

methodwithMatchHosts
Only match requests with the given Host header. Supports wildcards and ports. For unicode host names, do not use punycode.
withMatchHosts(hosts: string[]): YarpRoute
hostsstring[]
YarpRoute

Defined on

This method is defined on the following type: