File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/Certify.Server/Certify.Server.HubService Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 316316 description : $ "Hub API docs available at /api/docs"
317317) ;
318318
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+
319332// configure initialization of UI status hub, backend management hub etc
320333
321334var statusHubContext = app . Services . GetRequiredService < IHubContext < UserInterfaceStatusHub > > ( ) ;
You can’t perform that action at this time.
0 commit comments