From d861c30ef089e69a20cc18fa721d1275511c35e8 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 16 Oct 2018 18:15:35 +0000 Subject: [PATCH] --- server/AyaNova/Startup.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/AyaNova/Startup.cs b/server/AyaNova/Startup.cs index 5cf17dbf..cea0ad68 100644 --- a/server/AyaNova/Startup.cs +++ b/server/AyaNova/Startup.cs @@ -414,11 +414,11 @@ namespace AyaNova //AUTOID VALUES INITIALIZATION ServerBootConfig.SetMostRecentAutoIdValuesFromDatabase(dbContext); - //SPA FALLBACK ROUTE - //this ensures that a refresh at the client will not 404 but rather force back to the index.html app page and then handled internally - //by the client + //SPA FALLBACK ROUTE app.Use(async (context, next) => { + //to support html5 pushstate routing in spa + //this ensures that a refresh at the client will not 404 but rather force back to the index.html app page and then handled internally by the client await next(); if (context.Response.StatusCode == 404 && !Path.HasExtension(context.Request.Path.Value)) {