aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2023-01-28 16:52:28 -0600
committerJP Dillingham <jp@dillingham.me>2023-01-28 16:52:28 -0600
commit3010a89000fd08e0e5688d232c3cf70a98e6f8f2 (patch)
tree0bb95fc31366aebf7379daeafded87b8958587a4 /src
parent4869e19fb7b663387755e8751847acc2d925c41a (diff)
downloadslskd-3010a89000fd08e0e5688d232c3cf70a98e6f8f2.tar.gz
suppress ASP0014
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Program.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs
index c13cfdf1..5d7c37e1 100644
--- a/src/slskd/Program.cs
+++ b/src/slskd/Program.cs
@@ -841,6 +841,11 @@ namespace slskd
app.UseAuthentication();
app.UseRouting();
app.UseAuthorization();
+
+ // starting with .NET 7 the framework *really* wants you to use top level endpoint mapping
+ // for whatever reason this breaks everything, and i just can't bring myself to care unless
+ // UseEndpoints is going to be deprecated or if there's some material benefit
+#pragma warning disable ASP0014 // Suggest using top level route registrations
app.UseEndpoints(endpoints =>
{
endpoints.MapHub<ApplicationHub>("/hub/application");
@@ -885,6 +890,7 @@ namespace slskd
});
}
});
+#pragma warning restore ASP0014 // Suggest using top level route registrations
// if this is an /api route and no API controller was matched, give up and return a 404.
app.Use(async (context, next) =>