aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-01-18 21:43:58 -0600
committerJP Dillingham <jpdillingham@gmail.com>2021-01-18 21:43:58 -0600
commit4d7eaafd273e68393c323e53194d9ae24206c3c9 (patch)
treedc1ea3591e22117db600956a54feea2efb14061c /src
parent0b592d04b42c1ada38a361cb5fbb172c69d86dac (diff)
downloadslskd-4d7eaafd273e68393c323e53194d9ae24206c3c9.tar.gz
reorder middleware
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Startup.cs14
1 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 =>
{