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 Adapter: Always make requests using HTTPS #4380

Merged
merged 39 commits into from
Oct 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
8d635ff
Add microadBidAdapter
Feb 15, 2019
3055b90
Remove unnecessary encodeURIComponent from microadBidAdapter
Feb 26, 2019
67fb91b
Submit Advangelists Prebid Adapter
Feb 26, 2019
3ebb916
Submit Advangelists Prebid Adapter 1.1
Feb 27, 2019
4f5c451
Correct procudtion endpoint for prebid
Feb 28, 2019
2dc6d1d
Merge branch 'microad-bid-adapter' of git://github.com/strong-zero/Pr…
Feb 28, 2019
fa3e081
Merge remote-tracking branch 'origin/master' into master-rubicon-clean
Mar 18, 2019
600a46e
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Mar 18, 2019
7f578b3
Merge branch 'master' of https://github.com/prebid/Prebid.js
Mar 23, 2019
176a312
Merge branch 'master' of https://github.com/prebid/Prebid.js
Mar 26, 2019
9abf89c
Merge branch 'master' of https://github.com/prebid/Prebid.js
May 13, 2019
6ce04ab
Merge remote-tracking branch 'upstream/master'
Jun 10, 2019
415e2f6
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jun 27, 2019
61fb82c
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 11, 2019
3cc4c67
analytics update with wrapper name
Jul 11, 2019
cd81e02
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 15, 2019
e2b4e04
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 15, 2019
53b5970
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 15, 2019
5c00ed5
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 16, 2019
28848ad
reverted error merge
Jul 16, 2019
ab635ee
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 19, 2019
93308f5
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 24, 2019
1cfd52d
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jul 25, 2019
d619807
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jul 27, 2019
9893f0f
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 7, 2019
986a251
Merge remote-tracking branch 'upstream/master'
Aug 23, 2019
2cae7c0
Merge branch 'master' of https://github.com/prebid/Prebid.js into ori…
Aug 27, 2019
d7fd252
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 4, 2019
c7c01ba
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 10, 2019
24a28aa
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 10, 2019
7a1a4ec
Merge branch 'master' of https://github.com/rubicon-project/Prebid.js
Sep 25, 2019
4173d16
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 25, 2019
ca13952
update changed default value of netRevenue to true
Sep 27, 2019
0b6cd48
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 3, 2019
5f0110d
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 3, 2019
f930a34
Merge remote-tracking branch 'upstream/master'
Oct 8, 2019
9bff282
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 14, 2019
fc41461
Always make bids requests using https
Oct 25, 2019
faa9dbd
rp_secure and imp.secure should always be 1
Oct 25, 2019
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
14 changes: 5 additions & 9 deletions modules/rubiconBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@ import {BANNER, VIDEO} from '../src/mediaTypes';

const DEFAULT_INTEGRATION = 'pbjs_lite';

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

// use protocol relative urls for http or https
export const FASTLANE_ENDPOINT = '//fastlane.rubiconproject.com/a/api/fastlane.json';
export const VIDEO_ENDPOINT = '//prebid-server.rubiconproject.com/openrtb2/auction';
// always use https, regardless of whether or not current page is secure
export const FASTLANE_ENDPOINT = 'https://fastlane.rubiconproject.com/a/api/fastlane.json';
export const VIDEO_ENDPOINT = 'https://prebid-server.rubiconproject.com/openrtb2/auction';
export const SYNC_ENDPOINT = 'https://eus.rubiconproject.com/usync.html';

const DIGITRUST_PROP_NAMES = {
Expand Down Expand Up @@ -152,7 +148,7 @@ export const spec = {
imp: [{
exp: 300,
id: bidRequest.adUnitCode,
secure: isSecure() || bidRequest.params.secure ? 1 : 0,
secure: 1,
ext: {
rubicon: bidRequest.params
},
Expand Down Expand Up @@ -396,7 +392,7 @@ export const spec = {
'size_id': parsedSizes[0],
'alt_size_ids': parsedSizes.slice(1).join(',') || undefined,
'rp_floor': (params.floor = parseFloat(params.floor)) > 0.01 ? params.floor : 0.01,
'rp_secure': isSecure() ? '1' : '0',
'rp_secure': '1',
'tk_flint': `${configIntType || DEFAULT_INTEGRATION}_v$prebid.version$`,
'x_source.tid': bidRequest.transactionId,
'p_screen_res': _getScreenResolution(),
Expand Down
8 changes: 4 additions & 4 deletions test/spec/modules/rubiconBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ describe('the rubicon adapter', function () {
let [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
let data = parseQuery(request.data);

expect(request.url).to.equal('//fastlane.rubiconproject.com/a/api/fastlane.json');
expect(request.url).to.equal('https://fastlane.rubiconproject.com/a/api/fastlane.json');

let expectedQuery = {
'account_id': '14062',
Expand Down Expand Up @@ -418,7 +418,7 @@ describe('the rubicon adapter', function () {
let [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
let data = parseQuery(request.data);

expect(request.url).to.equal('//fastlane.rubiconproject.com/a/api/fastlane.json');
expect(request.url).to.equal('https://fastlane.rubiconproject.com/a/api/fastlane.json');

// test that all values above are both present and correct
Object.keys(expectedQuery).forEach(key => {
Expand All @@ -434,7 +434,7 @@ describe('the rubicon adapter', function () {
[request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
data = parseQuery(request.data);

expect(request.url).to.equal('//fastlane.rubiconproject.com/a/api/fastlane.json');
expect(request.url).to.equal('https://fastlane.rubiconproject.com/a/api/fastlane.json');

// test that all values above are both present and correct
Object.keys(expectedQuery).forEach(key => {
Expand Down Expand Up @@ -931,7 +931,7 @@ describe('the rubicon adapter', function () {
expect(item).to.have.property('bidRequest');

expect(item.method).to.equal('GET');
expect(item.url).to.equal('//fastlane.rubiconproject.com/a/api/fastlane.json');
expect(item.url).to.equal('https://fastlane.rubiconproject.com/a/api/fastlane.json');
expect(item.data).to.be.a('string');

// 'bidRequest' type must be 'array' if SRA enabled
Expand Down