fix #5352: remove requests to cookie consent service when not enabled
This commit is contained in:
@ -103,6 +103,9 @@
|
|||||||
{
|
{
|
||||||
var cookieConsentSetting = SettingService.GetSetting(PageState.Site.Settings, "CookieConsent", string.Empty);
|
var cookieConsentSetting = SettingService.GetSetting(PageState.Site.Settings, "CookieConsent", string.Empty);
|
||||||
_enabled = !string.IsNullOrEmpty(cookieConsentSetting);
|
_enabled = !string.IsNullOrEmpty(cookieConsentSetting);
|
||||||
|
|
||||||
|
if (!_enabled) return;
|
||||||
|
|
||||||
_optout = cookieConsentSetting == "optout";
|
_optout = cookieConsentSetting == "optout";
|
||||||
_actioned = await CookieConsentService.IsActionedAsync();
|
_actioned = await CookieConsentService.IsActionedAsync();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user