withBlazorClientApp

Method
📦 Aspire.Hosting.Blazor v17.0.0-preview.1.26567.5
interface ProjectResource {
// ... omitted for brevity
withBlazorClientApp(
wasmApp: BlazorWasmAppResource,
apiPrefix?: string,
otlpPrefix?: string,
proxyTelemetry?: boolean): ProjectResource;
}

Signature

methodwithBlazorClientAppbuilder
Attaches a Blazor WebAssembly app to the Gateway. The resource name is used as the URL path prefix (e.g., resource "store" → /store/). Service names are derived from WithReference() annotations on the WASM resource. Service references from the WASM app are automatically forwarded to the gateway so the gateway can resolve service endpoints for YARP proxying.
withBlazorClientApp(
wasmApp: BlazorWasmAppResource,
apiPrefix?: string,
otlpPrefix?: string,
proxyTelemetry?: boolean): ProjectResource
wasmAppBlazorWasmAppResourceThe Blazor WebAssembly app to attach to the gateway.
apiPrefixstringoptional= _apiThe URL path prefix for API proxy routes. Defaults to `"_api"`.
otlpPrefixstringoptional= _otlpThe URL path prefix for OTLP proxy routes. Defaults to `"_otlp"`.
proxyTelemetrybooleanoptional= True`true` to expose the OTLP proxy for the client app; otherwise, `false`.
ProjectResource

Applies to

This method applies to the following types: