[MAIN] STERICMS-959 — OneTrust cookie banner reappears after Accept/Reject on non-production hosts#1056
Merged
Merged
Conversation
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
rene-davila-hero
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
STERICMS-959 — OneTrust cookie banner reappears after Accept/Reject on non-production hosts
https://herodigital.atlassian.net/browse/STERICMS-959
Root cause
scripts/otconfing.jsdefaulted any unmatched host to the production OneTrust domain script (94a9f9f7-2ccd-4f46-b1a1-d11d479ed08c), which OneTrust authorizes only forshredit.com. Preview (*.aem.page), live mirror (*.aem.live), andlocalhostfell through to that production ID, so consent could not be recorded and the banner reappeared after every Accept/Reject. Only reproduces from consent-required regions (e.g. Bogotá/EU), not US regions.Fix
Rewrote
getOneTrustConfig()inscripts/otconfing.jsto return the production config only for the production domains and the-testconfig as the fail-safe default for every other host:TEST_CONFIGuses domain script94a9f9f7-2ccd-4f46-b1a1-d11d479ed08c-test. No change toshredit.com/www.shredit.com, no new dependencies, no build step,aem.jsuntouched.Test URLs
Before:
After: