From 4d529cd8cb656431251359fb2f458e0c15f6910a Mon Sep 17 00:00:00 2001 From: JustArchi Date: Mon, 24 Sep 2018 18:27:49 +0200 Subject: [PATCH] @Aareksio loves my fixes --- ArchiSteamFarm/IPC/Startup.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ArchiSteamFarm/IPC/Startup.cs b/ArchiSteamFarm/IPC/Startup.cs index 888a7f2ca..80ddac4d9 100644 --- a/ArchiSteamFarm/IPC/Startup.cs +++ b/ArchiSteamFarm/IPC/Startup.cs @@ -64,9 +64,8 @@ namespace ArchiSteamFarm.IPC { // We need MVC for /Api app.UseMvcWithDefaultRoute(); - // This will re-execute all definitions specified below to WWW root, we need this for 404 URLs such as /login -> /index.html - // It's nice to note that entries above (such as our /Api provided by MVC) is not affected by this, only static files - app.UseStatusCodePagesWithReExecute("/"); + // We're using index for URL routing in our static files so re-execute all non-API calls on / + app.UseWhen(context => !context.Request.Path.StartsWithSegments("/Api", StringComparison.OrdinalIgnoreCase), appBuilder => appBuilder.UseStatusCodePagesWithReExecute("/")); // We need static files support for IPC GUI app.UseDefaultFiles();