diff options
| author | JP Dillingham <jp@dillingham.me> | 2023-01-30 20:41:22 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-30 20:41:22 -0600 |
| commit | 57b2584efac2548011eb59fbda61f32d5d161ee0 (patch) | |
| tree | c9db3100a1920009a20ceb59c310cc6f8296dbe5 /src/slskd/Program.cs | |
| parent | 84f75d569bef855fc1b14e4ab2c42f01eeda873d (diff) | |
| parent | 4278d95a8923178563f54fbcbb4586638921e665 (diff) | |
| download | slskd-57b2584efac2548011eb59fbda61f32d5d161ee0.tar.gz | |
Merge branch 'master' into port
Diffstat (limited to 'src/slskd/Program.cs')
| -rw-r--r-- | src/slskd/Program.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs index f1f6bc03..65a42522 100644 --- a/src/slskd/Program.cs +++ b/src/slskd/Program.cs @@ -135,7 +135,7 @@ namespace slskd /// <summary> /// Gets the semantic application version. /// </summary> - public static string SemanticVersion { get; } = InformationalVersion.Split('-').First(); + public static string SemanticVersion { get; } = InformationalVersion.Split('+').First(); /// <summary> /// Gets the full application version, including both assembly and informational versions. @@ -246,7 +246,7 @@ namespace slskd try { - Arguments.Populate(clearExistingValues: false); + Arguments.Populate(clearExistingValues: false); } catch (Exception ex) { @@ -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) => |
