From 7d8a07e703cc87c1fc14b912bbbef0df790c6a0f Mon Sep 17 00:00:00 2001 From: Jeavon Date: Wed, 6 Apr 2022 00:35:53 +0100 Subject: [PATCH] Fix KeepAlive Config so that value from appsettings.json is used (#12224) * Fix KeepAlive Config so that value from appsettings.json is used if present * update comment to reflect get-set on KeepAlivePingUrl Co-authored-by: Nathan Woulfe --- src/Umbraco.Core/Configuration/Models/KeepAliveSettings.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/Configuration/Models/KeepAliveSettings.cs b/src/Umbraco.Core/Configuration/Models/KeepAliveSettings.cs index 305df2be8c..297e1dff87 100644 --- a/src/Umbraco.Core/Configuration/Models/KeepAliveSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/KeepAliveSettings.cs @@ -12,6 +12,7 @@ namespace Umbraco.Cms.Core.Configuration.Models public class KeepAliveSettings { internal const bool StaticDisableKeepAliveTask = false; + internal const string StaticKeepAlivePingUrl = "~/api/keepalive/ping"; /// /// Gets or sets a value indicating whether the keep alive task is disabled. @@ -20,8 +21,9 @@ namespace Umbraco.Cms.Core.Configuration.Models public bool DisableKeepAliveTask { get; set; } = StaticDisableKeepAliveTask; /// - /// Gets a value for the keep alive ping URL. + /// Gets or sets a value for the keep alive ping URL. /// - public string KeepAlivePingUrl => "~/api/keepalive/ping"; + [DefaultValue(StaticKeepAlivePingUrl)] + public string KeepAlivePingUrl { get; set; } = StaticKeepAlivePingUrl; } }