diff --git a/src/service/real-time-config/real-time-config-impl.js b/src/service/real-time-config/real-time-config-impl.js index 9c76b56908e2..75b780fb935f 100644 --- a/src/service/real-time-config/real-time-config-impl.js +++ b/src/service/real-time-config/real-time-config-impl.js @@ -63,7 +63,11 @@ export const RTC_ERROR_ENUM = { }; /** @const {!{[key: string]: boolean}} */ -const GLOBAL_MACRO_ALLOWLIST = {CLIENT_ID: true}; +const GLOBAL_MACRO_ALLOWLIST = { + CLIENT_ID: true, + TITLE: true, + SOURCE_URL: true, +}; export class RealTimeConfigService { /** diff --git a/test/unit/test-real-time-config.js b/test/unit/test-real-time-config.js index e54b87c79a73..b6a6b8a74b96 100644 --- a/test/unit/test-real-time-config.js +++ b/test/unit/test-real-time-config.js @@ -796,7 +796,8 @@ describes.realWin('real-time-config service', {amp: true}, (env) => { * Both save and retrieve to a cookie named `foo`. They should be isolated and the cookies should not be shared. * But, for some reason they are. So, for now use a cookie called bar here. */ - const url = 'https://www.foo.example/?cid=CLIENT_ID(bar)'; + const url = + 'https://www.foo.example/?title=TITLE&src=SOURCE_URL&cid=CLIENT_ID(bar)'; rtc.rtcConfig_ = { timeoutMillis: 1000, }; @@ -809,11 +810,9 @@ describes.realWin('real-time-config service', {amp: true}, (env) => { ); await rtc.promiseArray_[0]; expect(fetchJsonStub).to.be.called; - expect( - fetchJsonStub.calledWithMatch( - /https:\/\/www.foo.example\/\?cid=amp-\S+$/ - ) - ).to.be.true; + expect(fetchJsonStub).to.be.calledWithMatch( + /https:\/\/www\.foo\.example\/\?title=[^&]*&src=[^&]*&cid=amp-\S+$/ + ); }); });