Skip to content

Commit

Permalink
add new rp_secure param to rubicon adapter (#1190)
Browse files Browse the repository at this point in the history
  • Loading branch information
snapwich authored May 15, 2017
1 parent 0b9dc7b commit 5e7ef8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/adapters/rubicon.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ function getIntegration() {
return 'pbjs_lite_' + $$PREBID_GLOBAL$$.version;
}

function isSecure() {
return location.protocol === 'https:';
}

// use protocol relative urls for http or https
const FASTLANE_ENDPOINT = '//fastlane.rubiconproject.com/a/api/fastlane.json';
const VIDEO_ENDPOINT = '//fastlane-adv.rubiconproject.com/v1/auction/video';
Expand Down Expand Up @@ -246,6 +250,7 @@ function RubiconAdapter() {
'alt_size_ids', parsedSizes.slice(1).join(',') || undefined,
'p_pos', position,
'rp_floor', floor,
'rp_secure', isSecure() ? '1' : '0',
'tk_flint', getIntegration(),
'p_screen_res', _getScreenResolution(),
'kw', keywords,
Expand Down
3 changes: 2 additions & 1 deletion test/spec/adapters/rubicon_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ describe('the rubicon adapter', () => {
'alt_size_ids': '43',
'p_pos': 'atf',
'rp_floor': '0.01',
'rp_secure': /[01]/,
'tk_flint': INTEGRATION,
'p_screen_res': /\d+x\d+/,
'tk_user_key': '12346',
Expand Down Expand Up @@ -283,7 +284,7 @@ describe('the rubicon adapter', () => {
expect(query['alt_size_ids']).to.equal('57,59');

});

it('should not send a request and register an error bid if no valid sizes', () => {

var sizesBidderRequest = clone(bidderRequest);
Expand Down

0 comments on commit 5e7ef8f

Please sign in to comment.