aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Core/Options.cs6
-rw-r--r--src/slskd/Program.cs2
-rw-r--r--src/slskd/Properties/launchSettings.json2
-rw-r--r--src/web/src/config.js3
4 files changed, 6 insertions, 7 deletions
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs
index c9b46239..05331cd4 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; } = 50300;
+ public int ListenPort { get; init; } = 50000;
/// <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; } = 5030;
+ public int Port { get; init; } = 5000;
/// <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; } = 5031;
+ public int Port { get; init; } = 5001;
/// <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 65a42522..5d7c37e1 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};window.port={OptionsAtStartup.Web.Port}=\"</script>", excludedRoutes: new[] { "/api", "/swagger" });
+ app.UseHTMLInjection($"<script>window.urlBase=\"{urlBase}\"</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 04eb101f..b151b2f4 100644
--- a/src/slskd/Properties/launchSettings.json
+++ b/src/slskd/Properties/launchSettings.json
@@ -5,7 +5,7 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
- "applicationUrl": "https://localhost:5031;http://localhost:5030"
+ "applicationUrl": "https://localhost:5001;http://localhost:5000"
}
}
} \ No newline at end of file
diff --git a/src/web/src/config.js b/src/web/src/config.js
index 9dc19b5c..1cec9668 100644
--- a/src/web/src/config.js
+++ b/src/web/src/config.js
@@ -1,6 +1,5 @@
const urlBase = (window.urlBase === '/' ? '' : window.urlBase) || '';
-const devPort = window.port ?? 5030;
-const rootUrl = process.env.NODE_ENV === 'production' ? urlBase : `http://localhost:${devPort}${urlBase}`;
+const rootUrl = process.env.NODE_ENV === 'production' ? urlBase : `http://localhost:5000${urlBase}`;
const apiBaseUrl = `${rootUrl}/api/v0`;
const hubBaseUrl = `${rootUrl}/hub`;
const tokenKey = 'slskd-token';