Merge pull request #5353 from mdmontesinos/fix-cookieconsent
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();
|
||||||
|
|
||||||
@ -164,4 +167,4 @@
|
|||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user