We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26eff26 commit 95dfc2fCopy full SHA for 95dfc2f
1 file changed
src/Certify.Server/Certify.Server.HubService/Program.cs
@@ -316,6 +316,19 @@
316
description: $"Hub API docs available at /api/docs"
317
);
318
319
+// if request is for /ui/ then we are following a route intended for the Blazor UI, so rewrite the request to / to serve index.html
320
+// https://learn.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-9.0
321
+app.Use((context, next) =>
322
+{
323
+ if (context.Request.Path.StartsWithSegments("/ui"))
324
+ {
325
+ // Rewrite the request path to serve index.html
326
+ context.Request.Path = "/";
327
+ }
328
+
329
+ return next(context);
330
+});
331
332
// configure initialization of UI status hub, backend management hub etc
333
334
var statusHubContext = app.Services.GetRequiredService<IHubContext<UserInterfaceStatusHub>>();
0 commit comments