using EnvelopeGenerator.ReceiverUI.Web.Client.Api; using EnvelopeGenerator.ReceiverUI.Web.Client.Services; using EnvelopeGenerator.ReceiverUI.Web.Client.Utils; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.Services.AddDevExpressBlazor(options => { options.SizeMode = DevExpress.Blazor.SizeMode.Medium; }); builder.Services.AddChatClient(builder.HostEnvironment.BaseAddress + "api/chat", "proxykey", "proxychat"); builder.Services.AddDevExpressWebAssemblyBlazorPdfViewer(); DevExpress.XtraPrinting.PrintingOptions.Pdf.RenderingEngine = DevExpress.XtraPrinting.XRPdfRenderingEngine.Skia; // ── Receiver API + Auth + Localization ───────────────────────────── // Same-origin HttpClient: the BFF (EnvelopeGenerator.ReceiverUI.Web) // reverse-proxies /api/** to EnvelopeGenerator.API and forwards the // HttpOnly authentication cookie automatically. builder.Services.AddHttpClient(client => { client.BaseAddress = new Uri(builder.HostEnvironment.BaseAddress); }); builder.Services.AddScoped(); builder.Services.AddScoped(); await builder.Build().RunAsync();