diff options
Diffstat (limited to 'src/slskd')
| -rw-r--r-- | src/slskd/Core/Options.cs | 6 | ||||
| -rw-r--r-- | src/slskd/Program.cs | 2 | ||||
| -rw-r--r-- | src/slskd/Properties/launchSettings.json | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index 05331cd4..c9b46239 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -1127,7 +1127,7 @@ namespace slskd [EnvironmentVariable("SLSK_LISTEN_PORT")] [Description("port on which to listen for incoming connections")] [Range(1024, 65535)] - public int ListenPort { get; init; } = 50000; + public int ListenPort { get; init; } = 50300; /// <summary> /// Gets the minimum diagnostic level. @@ -1366,7 +1366,7 @@ namespace slskd [Description("HTTP listen port for web UI")] [Range(1, 65535)] [RequiresRestart] - public int Port { get; init; } = 5000; + public int Port { get; init; } = 5030; /// <summary> /// Gets HTTPS options. @@ -1557,7 +1557,7 @@ namespace slskd [Description("HTTPS listen port for web UI")] [Range(1, 65535)] [RequiresRestart] - public int Port { get; init; } = 5001; + public int Port { get; init; } = 5031; /// <summary> /// Gets a value indicating whether HTTP requests should be redirected to HTTPS. diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs index 5d7c37e1..65a42522 100644 --- a/src/slskd/Program.cs +++ b/src/slskd/Program.cs @@ -815,7 +815,7 @@ namespace slskd // prepend the url base. app.UsePathBase(urlBase); app.UseHTMLRewrite("((\\.)?\\/static)", $"{(urlBase == "/" ? string.Empty : urlBase)}/static"); - app.UseHTMLInjection($"<script>window.urlBase=\"{urlBase}\"</script>", excludedRoutes: new[] { "/api", "/swagger" }); + app.UseHTMLInjection($"<script>window.urlBase=\"{urlBase};window.port={OptionsAtStartup.Web.Port}=\"</script>", excludedRoutes: new[] { "/api", "/swagger" }); Log.Information("Using base url {UrlBase}", urlBase); // serve static content from the configured path diff --git a/src/slskd/Properties/launchSettings.json b/src/slskd/Properties/launchSettings.json index b151b2f4..04eb101f 100644 --- a/src/slskd/Properties/launchSettings.json +++ b/src/slskd/Properties/launchSettings.json @@ -5,7 +5,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }, - "applicationUrl": "https://localhost:5001;http://localhost:5000" + "applicationUrl": "https://localhost:5031;http://localhost:5030" } } }
\ No newline at end of file |
