diff options
| author | JP Dillingham <jp@dillingham.me> | 2023-02-03 15:22:38 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-03 15:22:38 -0600 |
| commit | 02364ac34c7ebabbb348a0806a36f6bc2153a609 (patch) | |
| tree | 1d329879f57f68259c0af92ecd8b73fca6d27f1b /src | |
| parent | 3162a3f7964e924372a7744f4ce02951894dfe38 (diff) | |
| parent | 9ee5accfcd65f98923724da3809cbcc8d5163061 (diff) | |
| download | slskd-02364ac34c7ebabbb348a0806a36f6bc2153a609.tar.gz | |
Merge pull request #874 from slskd/revert-862-port
Revert "Change default ports for HTTP, HTTPS, and Soulseek to 5030, 5031, and 50300, respectively"
Diffstat (limited to 'src')
| -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 | ||||
| -rw-r--r-- | src/web/src/config.js | 3 |
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'; |
