From a77207e83507f1444f1cfcb62ac66b4c55c0d6ce Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 8 May 2022 11:43:49 -0500 Subject: remove strict url enforcement --- src/slskd/Program.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/slskd/Program.cs') diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs index ecf028b4..af571a4e 100644 --- a/src/slskd/Program.cs +++ b/src/slskd/Program.cs @@ -602,13 +602,7 @@ namespace slskd var urlBase = OptionsAtStartup.Web.UrlBase; urlBase = urlBase.StartsWith("/") ? urlBase : "/" + urlBase; - // 404 if a custom urlBase is set, but the request doesn't include it. - // this is necessary to make sure the development-time and run-time behavior - // are consistent. - app.EnforceUrlBase(urlBase); - - // use urlBase. this effectively just removes urlBase from the path, which is - // why the enforcement behavior exists above (the actually requested path becomes ambiguous) + // use urlBase. this effectively just removes urlBase from the path. // inject urlBase into any html files we serve, and rewrite links to ./static or /static to // prepend the url base. app.UsePathBase(urlBase); -- cgit v1.2.3