aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2023-02-04 12:19:46 -0600
committerJP Dillingham <jp@dillingham.me>2023-02-04 12:19:46 -0600
commit6de4763df03c5bcbfceb60df25e6e8b36f2e32ad (patch)
treec9db3100a1920009a20ceb59c310cc6f8296dbe5 /src/slskd
parent02364ac34c7ebabbb348a0806a36f6bc2153a609 (diff)
downloadslskd-6de4763df03c5bcbfceb60df25e6e8b36f2e32ad.tar.gz
Revert "Merge pull request #874 from slskd/revert-862-port"
This reverts commit 02364ac34c7ebabbb348a0806a36f6bc2153a609, reversing changes made to 3162a3f7964e924372a7744f4ce02951894dfe38.
Diffstat (limited to 'src/slskd')
-rw-r--r--src/slskd/Core/Options.cs6
-rw-r--r--src/slskd/Program.cs2
-rw-r--r--src/slskd/Properties/launchSettings.json2
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