From c8058a6423e053bb02ba8e357e888d5b79345876 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Tue, 8 Jun 2021 15:00:15 -0400 Subject: [PATCH] PBS Bid Adapter: No longer pass test=1 on debug mode (#6924) * Update index.js * Update index.js --- modules/prebidServerBidAdapter/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/prebidServerBidAdapter/index.js b/modules/prebidServerBidAdapter/index.js index 150337f5923..bbf301fb072 100644 --- a/modules/prebidServerBidAdapter/index.js +++ b/modules/prebidServerBidAdapter/index.js @@ -730,7 +730,8 @@ const OPEN_RTB_PROTOCOL = { source: {tid: s2sBidRequest.tid}, tmax: s2sConfig.timeout, imp: imps, - test: getConfig('debug') ? 1 : 0, + // to do: add setconfig option to pass test = 1 + test: 0, ext: { prebid: { // set ext.prebid.auctiontimestamp with the auction timestamp. Data type is long integer. @@ -748,6 +749,11 @@ const OPEN_RTB_PROTOCOL = { // Sets pbjs version, can be overwritten below if channel exists in s2sConfig.extPrebid request.ext.prebid = Object.assign(request.ext.prebid, {channel: {name: 'pbjs', version: $$PREBID_GLOBAL$$.version}}) + // set debug flag if in debug mode + if (getConfig('debug')) { + request.ext.prebid = Object.assign(request.ext.prebid, {debug: 1}) + } + // s2sConfig video.ext.prebid is passed through openrtb to PBS if (s2sConfig.extPrebid && typeof s2sConfig.extPrebid === 'object') { request.ext.prebid = Object.assign(request.ext.prebid, s2sConfig.extPrebid);