From 878f415e214e7e4055031db2d93e537dd67f1b9b Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Sun, 7 Aug 2022 14:54:39 -0400 Subject: [PATCH] New: Add application URL to host configuration settings Fixes #2933 Closes #2934 (cherry picked from commit 762042ba97c2ae689cee32d8e66a458f6d7a8adc) --- frontend/src/Settings/General/HostSettings.js | 16 ++++++++++++++++ src/Lidarr.Api.V1/Config/HostConfigResource.cs | 4 +++- src/NzbDrone.Core/Configuration/ConfigService.cs | 2 ++ .../Configuration/IConfigService.cs | 1 + src/NzbDrone.Core/Localization/Core/en.json | 2 ++ 5 files changed, 24 insertions(+), 1 deletion(-) diff --git a/frontend/src/Settings/General/HostSettings.js b/frontend/src/Settings/General/HostSettings.js index acb70eaa1..56eb3e89b 100644 --- a/frontend/src/Settings/General/HostSettings.js +++ b/frontend/src/Settings/General/HostSettings.js @@ -21,6 +21,7 @@ function HostSettings(props) { port, urlBase, instanceName, + applicationUrl, enableSsl, sslPort, sslCertPath, @@ -96,6 +97,21 @@ function HostSettings(props) { /> + + {translate('ApplicationURL')} + + + + GetValueEnum("CertificateValidation", CertificateValidationType.Enabled); + public string ApplicationUrl => GetValue("ApplicationUrl", string.Empty); + private string GetValue(string key) { return GetValue(key, string.Empty); diff --git a/src/NzbDrone.Core/Configuration/IConfigService.cs b/src/NzbDrone.Core/Configuration/IConfigService.cs index baad9ab95..3d1be0eb1 100644 --- a/src/NzbDrone.Core/Configuration/IConfigService.cs +++ b/src/NzbDrone.Core/Configuration/IConfigService.cs @@ -98,5 +98,6 @@ namespace NzbDrone.Core.Configuration int BackupRetention { get; } CertificateValidationType CertificateValidation { get; } + string ApplicationUrl { get; } } } diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index 27ae36337..88662d08c 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -41,6 +41,8 @@ "APIKey": "API Key", "ApiKeyHelpTextWarning": "Requires restart to take effect", "AppDataDirectory": "AppData directory", + "ApplicationURL": "Application URL", + "ApplicationUrlHelpText": "This application's external URL including http(s)://, port and URL base", "ApplyTags": "Apply Tags", "ApplyTagsHelpTexts1": "How to apply tags to the selected artist", "ApplyTagsHelpTexts2": "Add: Add the tags the existing list of tags",