Skip to content

Commit

Permalink
Revert "support setting coopSync in s2sConfig (#6213)" (#6249)
Browse files Browse the repository at this point in the history
This reverts commit 25dd35c.
  • Loading branch information
bretg authored Feb 1, 2021
1 parent 25dd35c commit e60d10b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
4 changes: 0 additions & 4 deletions modules/prebidServerBidAdapter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,6 @@ function queueSync(bidderCodes, gdprConsent, uspConsent, s2sConfig) {
payload.us_privacy = uspConsent;
}

if (typeof _s2sConfig.coopSync === 'boolean') {
payload.coopSync = _s2sConfig.coopSync;
}

const jsonPayload = JSON.stringify(payload);
ajax(s2sConfig.syncEndpoint,
(response) => {
Expand Down
31 changes: 0 additions & 31 deletions test/spec/modules/prebidServerBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2434,36 +2434,5 @@ describe('S2S Adapter', function () {
const requestBid = JSON.parse(server.requests[0].requestBody);
expect(requestBid.bidders).to.deep.equal(['appnexus', 'rubicon']);
});

it('should add cooperative sync flag to cookie_sync request if property is present', function () {
let cookieSyncConfig = utils.deepClone(CONFIG);
cookieSyncConfig.coopSync = false;
cookieSyncConfig.syncEndpoint = 'https://prebid.adnxs.com/pbs/v1/cookie_sync';

let consentConfig = { s2sConfig: cookieSyncConfig };
config.setConfig(consentConfig);

let bidRequest = utils.deepClone(BID_REQUESTS);

adapter.callBids(REQUEST, bidRequest, addBidResponse, done, ajax);
let requestBid = JSON.parse(server.requests[0].requestBody);

expect(requestBid.coopSync).to.equal(false);
});

it('should not add cooperative sync flag to cookie_sync request if property is not present', function () {
let cookieSyncConfig = utils.deepClone(CONFIG);
cookieSyncConfig.syncEndpoint = 'https://prebid.adnxs.com/pbs/v1/cookie_sync';

let consentConfig = { s2sConfig: cookieSyncConfig };
config.setConfig(consentConfig);

let bidRequest = utils.deepClone(BID_REQUESTS);

adapter.callBids(REQUEST, bidRequest, addBidResponse, done, ajax);
let requestBid = JSON.parse(server.requests[0].requestBody);

expect(requestBid.coopSync).to.be.undefined;
});
});
});

0 comments on commit e60d10b

Please sign in to comment.