diff --git a/modules/prebidServerBidAdapter/config.js b/modules/prebidServerBidAdapter/config.js index 74eb4a95744..835d09e2010 100644 --- a/modules/prebidServerBidAdapter/config.js +++ b/modules/prebidServerBidAdapter/config.js @@ -2,7 +2,6 @@ export const S2S_VENDORS = { 'appnexus': { adapter: 'prebidServer', - cookieSet: false, enabled: true, endpoint: '//prebid.adnxs.com/pbs/v1/openrtb2/auction', syncEndpoint: '//prebid.adnxs.com/pbs/v1/cookie_sync', @@ -10,7 +9,6 @@ export const S2S_VENDORS = { }, 'rubicon': { adapter: 'prebidServer', - cookieSet: false, enabled: true, endpoint: '//prebid-server.rubiconproject.com/openrtb2/auction', syncEndpoint: '//prebid-server.rubiconproject.com/cookie_sync', diff --git a/modules/prebidServerBidAdapter/index.js b/modules/prebidServerBidAdapter/index.js index 972b6a7b5e2..0f4f4f7b6ff 100644 --- a/modules/prebidServerBidAdapter/index.js +++ b/modules/prebidServerBidAdapter/index.js @@ -3,7 +3,6 @@ import bidfactory from 'src/bidfactory'; import * as utils from 'src/utils'; import { ajax } from 'src/ajax'; import { STATUS, S2S, EVENTS } from 'src/constants'; -import { cookieSet } from 'src/cookie.js'; import adaptermanager from 'src/adaptermanager'; import { config } from 'src/config'; import { VIDEO } from 'src/mediaTypes'; @@ -44,7 +43,6 @@ config.setDefaults({ * @property {boolean} [cacheMarkup] whether to cache the adm result * @property {string} [adapter] adapter code to use for S2S * @property {string} [syncEndpoint] endpoint URL for syncing cookies - * @property {string} [cookieSetUrl] url for cookie set library, if passed then cookieSet is enabled */ function setS2sConfig(options) { if (options.defaultVendor) { @@ -624,11 +622,6 @@ export function PrebidServer() { }); bidderRequests.forEach(bidderRequest => events.emit(EVENTS.BIDDER_DONE, bidderRequest)); - - if (result.status === 'no_cookie' && _s2sConfig.cookieSet && typeof _s2sConfig.cookieSetUrl === 'string') { - // cookie sync - cookieSet(_s2sConfig.cookieSetUrl); - } } catch (error) { utils.logError(error); } diff --git a/src/cookie.js b/src/cookie.js deleted file mode 100644 index 893e22e6f27..00000000000 --- a/src/cookie.js +++ /dev/null @@ -1,11 +0,0 @@ -import * as utils from './utils'; -import adLoader from './adloader'; - -const cookie = exports; - -cookie.cookieSet = function(cookieSetUrl) { - if (!utils.isSafariBrowser()) { - return; - } - adLoader.loadScript(cookieSetUrl, null, true); -}; diff --git a/test/spec/modules/prebidServerBidAdapter_spec.js b/test/spec/modules/prebidServerBidAdapter_spec.js index 7c3a356c9e8..15aa94ad335 100644 --- a/test/spec/modules/prebidServerBidAdapter_spec.js +++ b/test/spec/modules/prebidServerBidAdapter_spec.js @@ -2,7 +2,6 @@ import { expect } from 'chai'; import { PrebidServer as Adapter, resetSyncedStatus } from 'modules/prebidServerBidAdapter/index.js'; import adapterManager from 'src/adaptermanager'; import * as utils from 'src/utils'; -import cookie from 'src/cookie'; import { userSync } from 'src/userSync'; import { ajax } from 'src/ajax'; import { config } from 'src/config'; @@ -723,7 +722,6 @@ describe('S2S Adapter', function () { sinon.stub(utils, 'triggerPixel'); sinon.stub(utils, 'insertUserSyncIframe'); sinon.stub(utils, 'logError'); - sinon.stub(cookie, 'cookieSet'); sinon.stub(events, 'emit'); logWarnSpy = sinon.spy(utils, 'logWarn'); }); @@ -734,7 +732,6 @@ describe('S2S Adapter', function () { utils.insertUserSyncIframe.restore(); utils.logError.restore(); events.emit.restore(); - cookie.cookieSet.restore(); logWarnSpy.restore(); }); @@ -907,30 +904,6 @@ describe('S2S Adapter', function () { expect(bid_request_passed).to.have.property('adId', '123'); }); - it('does not call cookieSet cookie sync when no_cookie response && not opted in', function () { - server.respondWith(JSON.stringify(RESPONSE_NO_PBS_COOKIE)); - - let myConfig = Object.assign({}, CONFIG); - - config.setConfig({s2sConfig: myConfig}); - adapter.callBids(REQUEST, BID_REQUESTS, addBidResponse, done, ajax); - server.respond(); - sinon.assert.notCalled(cookie.cookieSet); - }); - - it('calls cookieSet cookie sync when no_cookie response && opted in', function () { - server.respondWith(JSON.stringify(RESPONSE_NO_PBS_COOKIE)); - let myConfig = Object.assign({ - cookieSet: true, - cookieSetUrl: 'https://acdn.adnxs.com/cookieset/cs.js' - }, CONFIG); - - config.setConfig({s2sConfig: myConfig}); - adapter.callBids(REQUEST, BID_REQUESTS, addBidResponse, done, ajax); - server.respond(); - sinon.assert.calledOnce(cookie.cookieSet); - }); - it('handles OpenRTB responses and call BIDDER_DONE', function () { const s2sConfig = Object.assign({}, CONFIG, { endpoint: 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction' @@ -1070,8 +1043,6 @@ describe('S2S Adapter', function () { expect(vendorConfig).to.have.property('accountId', '123'); expect(vendorConfig).to.have.property('adapter', 'prebidServer'); expect(vendorConfig.bidders).to.deep.equal(['appnexus']); - expect(vendorConfig.cookieSet).to.be.false; - expect(vendorConfig.cookieSetUrl).to.be.undefined; expect(vendorConfig.enabled).to.be.true; expect(vendorConfig).to.have.property('endpoint', '//prebid.adnxs.com/pbs/v1/openrtb2/auction'); expect(vendorConfig).to.have.property('syncEndpoint', '//prebid.adnxs.com/pbs/v1/cookie_sync'); @@ -1093,8 +1064,6 @@ describe('S2S Adapter', function () { expect(vendorConfig).to.have.property('accountId', 'abc'); expect(vendorConfig).to.have.property('adapter', 'prebidServer'); expect(vendorConfig.bidders).to.deep.equal(['rubicon']); - expect(vendorConfig.cookieSet).to.be.false; - expect(vendorConfig.cookieSetUrl).to.be.undefined; expect(vendorConfig.enabled).to.be.true; expect(vendorConfig).to.have.property('endpoint', '//prebid-server.rubiconproject.com/openrtb2/auction'); expect(vendorConfig).to.have.property('syncEndpoint', '//prebid-server.rubiconproject.com/cookie_sync');