withBlazorClientApp

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

Signature

methodwithBlazorClientAppbuilder
Attaches a Blazor WebAssembly app to the gateway. The app's resource name becomes its URL path prefix, and its service references are forwarded to the gateway for proxying.
withBlazorClientApp(
wasmApp: BlazorWasmAppResource,
apiPrefix?: string,
otlpPrefix?: string,
proxyTelemetry?: boolean): DotnetProjectResource
wasmAppBlazorWasmAppResourceThe Blazor WebAssembly app to attach to the gateway.
apiPrefixstringoptional= _apiThe URL path prefix for API proxy routes. The default is `"_api"`.
otlpPrefixstringoptional= _otlpThe URL path prefix for telemetry proxy routes. The default is `"_otlp"`.
proxyTelemetrybooleanoptional= True`true` to expose the telemetry proxy for the client app; otherwise, `false`.
DotnetProjectResource

Applies to

This method applies to the following types: