Skip to content

Commit

Permalink
add dev env to not show cookies consent
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakshmishri committed Sep 9, 2024
1 parent 7a4d5f9 commit 5980887
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/delayed.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { loadScript } from './aem.js';

// OneTrust Cookies Consent Notice
if (!window.location.pathname.includes('srcdoc')
&& !['localhost', 'hlx.live', 'aem.page', 'aem.live'].some((url) => window.location.host.includes(url))) {
&& !['localhost', 'hlx.page', 'hlx.live', 'aem.page', 'aem.live'].some((url) => window.location.host.includes(url))) {
// when running on localhost in the block library host is empty but the path is srcdoc
// on localhost/hlx.page/hlx.live the consent notice is displayed every time the page opens,
// because the cookie is not persistent. To avoid this annoyance, disable unless on the
Expand Down

0 comments on commit 5980887

Please sign in to comment.