aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-01-18 21:47:47 -0600
committerGitHub <noreply@github.com>2021-01-18 21:47:47 -0600
commit9a56c438f08238fef633a30124d853c18445803e (patch)
treedc1ea3591e22117db600956a54feea2efb14061c /src
parent09502d9c8134d7606f04aef4e9fec1a72d54c64d (diff)
parent4d7eaafd273e68393c323e53194d9ae24206c3c9 (diff)
downloadslskd-9a56c438f08238fef633a30124d853c18445803e.tar.gz
Merge pull request #19 from slskd/route-fix
Fix routing when BASE_PATH is set
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Startup.cs14
-rw-r--r--src/web/public/favicon.icobin0 -> 1150 bytes
2 files changed, 7 insertions, 7 deletions
diff --git a/src/slskd/Startup.cs b/src/slskd/Startup.cs
index 83f6dd1b..b6ef0788 100644
--- a/src/slskd/Startup.cs
+++ b/src/slskd/Startup.cs
@@ -196,17 +196,11 @@
}
app.UseCors("AllowAll");
- app.UseAuthentication();
-
- app.UseSerilogRequestLogging();
-
- app.UseRouting();
- app.UseHttpMetrics();
app.UsePathBase(BasePath);
// remove any errant double forward slashes which may have been introduced
// by a reverse proxy or having the base path removed
- app.Use(async (context, next) =>
+ app.Use(async (context, next) =>
{
var path = context.Request.Path.ToString();
@@ -228,6 +222,12 @@
app.UseFileServer(fileServerOptions);
+ app.UseSerilogRequestLogging();
+ app.UseHttpMetrics();
+
+ app.UseAuthentication();
+
+ app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
diff --git a/src/web/public/favicon.ico b/src/web/public/favicon.ico
new file mode 100644
index 00000000..6c4ad2c2
--- /dev/null
+++ b/src/web/public/favicon.ico
Binary files differ