diff --git a/modules/prebidServerBidAdapter/index.js b/modules/prebidServerBidAdapter/index.js index 3181bebbfa7..45a0e6d83d3 100644 --- a/modules/prebidServerBidAdapter/index.js +++ b/modules/prebidServerBidAdapter/index.js @@ -719,7 +719,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. @@ -737,6 +738,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);