Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rubicon Bid Adapter: Do not send storedrequests #8717

Merged
merged 2 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions modules/rubiconBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,11 @@ export const spec = {
// set ext.prebid.auctiontimestamp using auction time
deepSetValue(data.imp[0], 'ext.prebid.auctiontimestamp', bidderRequest.auctionStart);

// set storedrequests to undefined so not sent to PBS
// top level and imp level both 'ext.prebid' objects are set above so no exception thrown here
data.ext.prebid.storedrequest = undefined;
data.imp[0].ext.prebid.storedrequest = undefined;

return {
method: 'POST',
url: `https://${rubiConf.videoHost || 'prebid-server'}.rubiconproject.com/openrtb2/auction`,
Expand Down
27 changes: 27 additions & 0 deletions test/spec/modules/rubiconBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2139,6 +2139,33 @@ describe('the rubicon adapter', function () {
expect(request.data.imp[0].ext.data.pbadslot).to.equal('1234567890');
});

it('should NOT include storedrequests in pbs payload', function () {
createVideoBidderRequest();
bidderRequest.bids[0].ortb2 = {
ext: {
prebid: {
storedrequest: 'no-send-top-level-sr'
}
}
}

bidderRequest.bids[0].ortb2Imp = {
ext: {
prebid: {
storedrequest: 'no-send-imp-sr'
}
}
}

sandbox.stub(Date, 'now').callsFake(() =>
bidderRequest.auctionStart + 100
);

const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
expect(request.data.ext.prebid.storedrequest).to.be.undefined;
expect(request.data.imp[0].ext.prebid.storedrequest).to.be.undefined;
});

it('should include GAM ad unit in bid request', function () {
createVideoBidderRequest();
bidderRequest.bids[0].ortb2Imp = {
Expand Down