Skip to content

Commit

Permalink
Merge pull request #11 from sovrn/HS-403_WIP
Browse files Browse the repository at this point in the history
HS-403: send iv as query param
  • Loading branch information
aprakash-sovrn authored Jun 27, 2018
2 parents d17b2ec + 0a051c3 commit 5511c2e
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 5511c2e

Please sign in to comment.