KubernetesGatewayResource.withHostname

Method
📦 Aspire.Hosting.Kubernetes v17.0.0
interface KubernetesGatewayResource {
// ... omitted for brevity
withHostname(hostname: string): KubernetesGatewayResource;
}

Signature

methodwithHostnamebuilder
Adds a hostname that this gateway's routes match. Multiple hostnames can be added by calling this method repeatedly. Routes without an explicit host apply to each configured hostname. Hostnames are used as `hostnames` in generated `HTTPRoute` resources and as HTTPS listener hostnames when TLS is configured.
withHostname(hostname: string): KubernetesGatewayResource
hostnamestringThe hostname to match (e.g., `"api.example.com"`).
KubernetesGatewayResource

Defined on

This method is defined on the following type: