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 <nathan@nathanw.com.au>
This commit is contained in:
Jeavon
2022-04-06 00:35:53 +01:00
committed by GitHub
parent 6423529dd0
commit 7d8a07e703

View File

@@ -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";
/// <summary>
/// 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;
/// <summary>
/// Gets a value for the keep alive ping URL.
/// Gets or sets a value for the keep alive ping URL.
/// </summary>
public string KeepAlivePingUrl => "~/api/keepalive/ping";
[DefaultValue(StaticKeepAlivePingUrl)]
public string KeepAlivePingUrl { get; set; } = StaticKeepAlivePingUrl;
}
}