Skip to content

Commit

Permalink
Send IV as query param (prebid#2797)
Browse files Browse the repository at this point in the history
  • Loading branch information
aprakash-sovrn authored and AlessandroDG committed Sep 13, 2018
1 parent 4390115 commit 26cc940
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions modules/sovrnBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export const spec = {
page: loc.host + loc.pathname + loc.search + loc.hash
}
};
if (iv) sovrnBidReq.iv = iv;

if (bidderRequest && bidderRequest.gdprConsent) {
sovrnBidReq.regs = {
Expand All @@ -55,9 +54,13 @@ export const spec = {
}};
}

let url = `//ap.lijit.com/rtb/bid?` +
`src=${REPO_AND_VERSION}`;
if (iv) url += `&iv=${iv}`;

return {
method: 'POST',
url: `//ap.lijit.com/rtb/bid?src=${REPO_AND_VERSION}`,
url: url,
data: JSON.stringify(sovrnBidReq),
options: {contentType: 'text/plain'}
};
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/sovrnBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('sovrnBidAdapter', function() {
}];
const request = spec.buildRequests(ivBidRequests);

expect(request.data).to.contain('"iv":"vet"')
expect(request.url).to.contain('iv=vet')
});

it('sends gdpr info if exists', () => {
Expand Down

0 comments on commit 26cc940

Please sign in to comment.