Skip to content

Commit

Permalink
Make all adapters https (#4294)
Browse files Browse the repository at this point in the history
* update all adapters to https

* convert all adapters to https

* update unit tests

* remove files confilicting with other PR
  • Loading branch information
sumit116 authored Nov 26, 2019
1 parent 1417c94 commit 3164cfa
Show file tree
Hide file tree
Showing 163 changed files with 589 additions and 602 deletions.
4 changes: 2 additions & 2 deletions modules/aardvarkBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const spec = {
var req = requestsMap[auctionId];
requests.push({
method: 'GET',
url: `//${req.endpoint}/${auctionId}/${req.shortCodes.join('_')}/aardvark`,
url: `https://${req.endpoint}/${auctionId}/${req.shortCodes.join('_')}/aardvark`,
data: req.payload,
bidderRequest
});
Expand Down Expand Up @@ -162,7 +162,7 @@ export const spec = {

getUserSyncs: function(syncOptions, serverResponses, gdprConsent) {
const syncs = [];
var url = '//' + SYNC_ENDPOINT + '/cs';
var url = 'https://' + SYNC_ENDPOINT + '/cs';
var gdprApplies = false;
if (gdprConsent && (typeof gdprConsent.gdprApplies === 'boolean')) {
gdprApplies = gdprConsent.gdprApplies;
Expand Down
2 changes: 1 addition & 1 deletion modules/adformBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const spec = {
request.push(formRequestUrl(reqParams));
}

request.unshift('//' + globalParams[0][1] + '/adx/?rp=4');
request.unshift('https://' + globalParams[0][1] + '/adx/?rp=4');
netRevenue = netRevenue || 'gross';
request.push('pt=' + netRevenue);
request.push('stid=' + validBidRequests[0].auctionId);
Expand Down
2 changes: 1 addition & 1 deletion modules/adformOpenRTBBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const spec = {

return {
method: 'POST',
url: '//' + adxDomain + '/adx/openrtb',
url: 'https://' + adxDomain + '/adx/openrtb',
data: JSON.stringify(request),
options: {
contentType: 'application/json'
Expand Down
2 changes: 1 addition & 1 deletion modules/adgenerationBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const spec = {
let serverRequests = [];
for (let i = 0, len = validBidRequests.length; i < len; i++) {
const validReq = validBidRequests[i];
const DEBUG_URL = 'http://api-test.scaleout.jp/adsv/v1';
const DEBUG_URL = 'https://api-test.scaleout.jp/adsv/v1';
const URL = 'https://d.socdm.com/adsv/v1';
const url = validReq.params.debug ? DEBUG_URL : URL;
let data = ``;
Expand Down
4 changes: 2 additions & 2 deletions modules/admaticBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as utils from '../src/utils';
import { registerBidder } from '../src/adapters/bidderFactory';

const BIDDER_CODE = 'admatic';
const ENDPOINT_URL = '//ads4.admatic.com.tr/prebid/v3/bidrequest';
const ENDPOINT_URL = 'https://ads4.admatic.com.tr/prebid/v3/bidrequest';

export const spec = {
code: BIDDER_CODE,
Expand Down Expand Up @@ -108,7 +108,7 @@ export const spec = {
if (syncOptions.iframeEnabled) {
syncs.push({
type: 'iframe',
url: '//ads4.admatic.com.tr/prebid/static/usersync/v3/async_usersync.html'
url: 'https://ads4.admatic.com.tr/prebid/static/usersync/v3/async_usersync.html'
});
}

Expand Down
2 changes: 1 addition & 1 deletion modules/admediaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as utils from '../src/utils';
import {registerBidder} from '../src/adapters/bidderFactory';

const BIDDER_CODE = 'admedia';
const ENDPOINT_URL = '//prebid.admedia.com/bidder/';
const ENDPOINT_URL = 'https://prebid.admedia.com/bidder/';

export const spec = {
code: BIDDER_CODE,
Expand Down
4 changes: 2 additions & 2 deletions modules/adspendBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { registerBidder } from '../src/adapters/bidderFactory';
import { BANNER } from '../src/mediaTypes';

const BIDDER_CODE = 'adspend';
const BID_URL = '//rtb.com.ru/headerbidding-bid';
const SYNC_URL = '//rtb.com.ru/headerbidding-sync?uid={UUID}';
const BID_URL = 'https://rtb.com.ru/headerbidding-bid';
const SYNC_URL = 'https://rtb.com.ru/headerbidding-sync?uid={UUID}';
const COOKIE_NAME = 'hb-adspend-id';
const UUID_LEN = 36;
const TTL = 10000;
Expand Down
2 changes: 1 addition & 1 deletion modules/advenueBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes';
import * as utils from '../src/utils';

const BIDDER_CODE = 'advenue';
const URL_MULTI = '//ssp.advenuemedia.co.uk/?c=o&m=multi';
const URL_MULTI = 'https://ssp.advenuemedia.co.uk/?c=o&m=multi';

export const spec = {
code: BIDDER_CODE,
Expand Down
2 changes: 1 addition & 1 deletion modules/ajaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { registerBidder } from '../src/adapters/bidderFactory';
import { VIDEO, BANNER, NATIVE } from '../src/mediaTypes';

const BIDDER_CODE = 'aja';
const URL = '//ad.as.amanad.adtdp.com/v2/prebid';
const URL = 'https://ad.as.amanad.adtdp.com/v2/prebid';
const SDK_TYPE = 5;
const AD_TYPE = {
BANNER: 1,
Expand Down
6 changes: 3 additions & 3 deletions modules/appnexusBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import includes from 'core-js/library/fn/array/includes';
import { OUTSTREAM, INSTREAM } from '../src/video';

const BIDDER_CODE = 'appnexus';
const URL = '//ib.adnxs.com/ut/v3/prebid';
const URL = 'https://ib.adnxs.com/ut/v3/prebid';
const VIDEO_TARGETING = ['id', 'mimes', 'minduration', 'maxduration',
'startdelay', 'skippable', 'playback_method', 'frameworks'];
const USER_PARAMS = ['age', 'externalUid', 'segments', 'gender', 'dnt', 'language'];
Expand All @@ -34,7 +34,7 @@ const NATIVE_MAPPING = {
};
const SOURCE = 'pbjs';
const MAX_IMPS_PER_REQUEST = 15;
const mappingFileUrl = '//acdn.adnxs.com/prebid/appnexus-mapping/mappings.json';
const mappingFileUrl = 'https://acdn.adnxs.com/prebid/appnexus-mapping/mappings.json';
const SCRIPT_TAG_START = '<script';
const VIEWABILITY_URL_START = /\/\/cdn\.adnxs\.com\/v/;
const VIEWABILITY_FILE_NAME = 'trk.js';
Expand Down Expand Up @@ -261,7 +261,7 @@ export const spec = {
if (syncOptions.iframeEnabled) {
return [{
type: 'iframe',
url: '//acdn.adnxs.com/ib/static/usersync/v3/async_usersync.html'
url: 'https://acdn.adnxs.com/ib/static/usersync/v3/async_usersync.html'
}];
}
},
Expand Down
2 changes: 1 addition & 1 deletion modules/atomxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const spec = {
return validBidRequests.map(bidRequest => {
return {
method: 'GET',
url: location.protocol + '//p.ato.mx/placement',
url: 'https://p.ato.mx/placement',
data: {
v: 12,
id: bidRequest.params.id,
Expand Down
6 changes: 3 additions & 3 deletions modules/betweenBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const spec = {
if (syncOptions.iframeEnabled) {
syncs.push({
type: 'iframe',
url: '//acdn.adnxs.com/ib/static/usersync/v3/async_usersync.html'
url: 'https://acdn.adnxs.com/ib/static/usersync/v3/async_usersync.html'
});
}
if (syncOptions.pixelEnabled && serverResponses.length > 0) {
Expand All @@ -108,11 +108,11 @@ export const spec = {

// syncs.push({
// type: 'iframe',
// url: '//acdn.adnxs.com/ib/static/usersync/v3/async_usersync.html'
// url: 'https://acdn.adnxs.com/ib/static/usersync/v3/async_usersync.html'
// });
syncs.push({
type: 'iframe',
url: '//ads.betweendigital.com/sspmatch-iframe'
url: 'https://ads.betweendigital.com/sspmatch-iframe'
});
return syncs;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/bidfluenceBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const spec = {
const payloadString = JSON.stringify(payload);
return {
method: 'POST',
url: `//bdf${payload.bids[0].pid}.bidfluence.com/Prebid`,
url: `https://bdf${payload.bids[0].pid}.bidfluence.com/Prebid`,
data: payloadString,
options: { contentType: 'text/plain' }
};
Expand Down
46 changes: 23 additions & 23 deletions modules/bidglassBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const spec = {
* @param {validBidRequests[]} - an array of bids
* @return ServerRequest Info describing the request to the server.
*/
buildRequests: function(validBidRequests, bidderRequest) {
buildRequests: function(validBidRequests, bidderRequest) {
/*
Sample array entry for validBidRequests[]:
[{
Expand All @@ -42,32 +42,32 @@ export const spec = {
*/

let imps = [];
let getReferer = function() {
return window === window.top ? window.location.href : window.parent === window.top ? document.referrer : null;
let getReferer = function() {
return window === window.top ? window.location.href : window.parent === window.top ? document.referrer : null;
};
let getOrigins = function() {
var ori = [window.location.protocol + '//' + window.location.hostname];

if (window.location.ancestorOrigins) {
for (var i = 0; i < window.location.ancestorOrigins.length; i++) {
ori.push(window.location.ancestorOrigins[i]);
}
} else if (window !== window.top) {
let getOrigins = function() {
var ori = ['https://' + window.location.hostname];

if (window.location.ancestorOrigins) {
for (var i = 0; i < window.location.ancestorOrigins.length; i++) {
ori.push(window.location.ancestorOrigins[i]);
}
} else if (window !== window.top) {
// Derive the parent origin
var parts = document.referrer.split('/');

ori.push(parts[0] + '//' + parts[2]);
ori.push('https://' + parts[2]);

if (window.parent !== window.top) {
if (window.parent !== window.top) {
// Additional unknown origins exist
ori.push('null');
}
ori.push('null');
}
}

return ori;
return ori;
};

utils._each(validBidRequests, function(bid) {
utils._each(validBidRequests, function(bid) {
bid.sizes = ((utils.isArray(bid.sizes) && utils.isArray(bid.sizes[0])) ? bid.sizes : [bid.sizes]);
bid.sizes = bid.sizes.filter(size => utils.isArray(size));

Expand All @@ -76,7 +76,7 @@ export const spec = {
bidId: bid.bidId,
sizes: bid.sizes,
adUnitId: utils.getBidIdParameter('adUnitId', bid.params)
});
});
});

// Stuff to send: page URL
Expand All @@ -98,7 +98,7 @@ export const spec = {
contentType: 'text/plain',
withCredentials: false
}
}
}
},

/**
Expand All @@ -107,10 +107,10 @@ export const spec = {
* @param {ServerResponse} serverResponse A successful response from the server.
* @return {Bid[]} An array of bids which were nested inside the server.
*/
interpretResponse: function(serverResponse) {
interpretResponse: function(serverResponse) {
const bidResponses = [];

utils._each(serverResponse.body.bidResponses, function(bid) {
utils._each(serverResponse.body.bidResponses, function(bid) {
bidResponses.push({
requestId: bid.requestId,
cpm: parseFloat(bid.cpm),
Expand All @@ -123,10 +123,10 @@ export const spec = {
netRevenue: true,
ttl: bid.ttl || 10,
ad: bid.ad
});
});
});

return bidResponses;
return bidResponses;
}

}
Expand Down
2 changes: 1 addition & 1 deletion modules/bidphysicsBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {registerBidder} from '../src/adapters/bidderFactory';
import * as utils from '../src/utils';
import {BANNER} from '../src/mediaTypes';

const ENDPOINT_URL = '//exchange.bidphysics.com/auction';
const ENDPOINT_URL = 'https://exchange.bidphysics.com/auction';

const DEFAULT_BID_TTL = 30;
const DEFAULT_CURRENCY = 'USD';
Expand Down
5 changes: 2 additions & 3 deletions modules/c1xBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { userSync } from '../src/userSync';

const BIDDER_CODE = 'c1x';
const URL = 'https://ht.c1exchange.com/ht';
const PIXEL_ENDPOINT = '//px.c1exchange.com/pubpixel/';
const PIXEL_ENDPOINT = 'https://px.c1exchange.com/pubpixel/';
const LOG_MSG = {
invalidBid: 'C1X: [ERROR] bidder returns an invalid bid',
noSite: 'C1X: [ERROR] no site id supplied',
Expand Down Expand Up @@ -41,7 +41,6 @@ export const c1xAdapter = {
// flattened tags in a tag object
tagObj = c1xTags.reduce((current, next) => Object.assign(current, next));
const pixelId = tagObj.pixelId;
const useSSL = document.location.protocol;

payload = {
adunits: adunits.toString(),
Expand All @@ -58,7 +57,7 @@ export const c1xAdapter = {
}

if (pixelId) {
pixelUrl = (useSSL ? 'https:' : 'http:') + PIXEL_ENDPOINT + pixelId;
pixelUrl = PIXEL_ENDPOINT + pixelId;
if (payload.consent_required) {
pixelUrl += '&gdpr=' + (bidderRequest.gdprConsent.gdprApplies ? 1 : 0);
pixelUrl += '&consent=' + encodeURIComponent(bidderRequest.gdprConsent.consentString || '');
Expand Down
4 changes: 2 additions & 2 deletions modules/cedatoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { registerBidder } from '../src/adapters/bidderFactory';
import { BANNER, VIDEO } from '../src/mediaTypes';

const BIDDER_CODE = 'cedato';
const BID_URL = '//h.cedatoplayer.com/hb';
const SYNC_URL = '//h.cedatoplayer.com/hb_usync?uid={UUID}';
const BID_URL = 'https://h.cedatoplayer.com/hb';
const SYNC_URL = 'https://h.cedatoplayer.com/hb_usync?uid={UUID}';
const COOKIE_NAME = 'hb-cedato-id';
const UUID_LEN = 36;
const TTL = 10000;
Expand Down
2 changes: 1 addition & 1 deletion modules/clickforceBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as utils from '../src/utils';
import {registerBidder} from '../src/adapters/bidderFactory';
import {BANNER, NATIVE} from '../src/mediaTypes';
const BIDDER_CODE = 'clickforce';
const ENDPOINT_URL = '//ad.doublemax.net/adserver/prebid.json?cb=' + new Date().getTime() + '&hb=1&ver=1.21';
const ENDPOINT_URL = 'https://ad.doublemax.net/adserver/prebid.json?cb=' + new Date().getTime() + '&hb=1&ver=1.21';

export const spec = {
code: BIDDER_CODE,
Expand Down
4 changes: 2 additions & 2 deletions modules/collectcentBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes';
import * as utils from '../src/utils';

const BIDDER_CODE = 'collectcent';
const URL_MULTI = '//publishers.motionspots.com/?c=o&m=multi';
const URL_SYNC = '//publishers.motionspots.com/?c=o&m=cookie';
const URL_MULTI = 'https://publishers.motionspots.com/?c=o&m=multi';
const URL_SYNC = 'https://publishers.motionspots.com/?c=o&m=cookie';

export const spec = {
code: BIDDER_CODE,
Expand Down
4 changes: 2 additions & 2 deletions modules/cosmosBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { BANNER, VIDEO } from '../src/mediaTypes';
import * as utils from '../src/utils';

const BIDDER_CODE = 'cosmos';
const BID_ENDPOINT = '//bid.cosmoshq.com/openrtb2/bids';
const USER_SYNC_ENDPOINT = '//sync.cosmoshq.com/js/v1/usersync.html';
const BID_ENDPOINT = 'https://bid.cosmoshq.com/openrtb2/bids';
const USER_SYNC_ENDPOINT = 'https://sync.cosmoshq.com/js/v1/usersync.html';
const HTTP_POST = 'POST';
const LOG_PREFIX = 'COSMOS: ';
const DEFAULT_CURRENCY = 'USD';
Expand Down
6 changes: 3 additions & 3 deletions modules/cpmstarBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {VIDEO, BANNER} from '../src/mediaTypes';

const BIDDER_CODE = 'cpmstar';

const ENDPOINT_DEV = '//dev.server.cpmstar.com/view.aspx';
const ENDPOINT_STAGING = '//staging.server.cpmstar.com/view.aspx';
const ENDPOINT_PRODUCTION = '//server.cpmstar.com/view.aspx';
const ENDPOINT_DEV = 'https://dev.server.cpmstar.com/view.aspx';
const ENDPOINT_STAGING = 'https://staging.server.cpmstar.com/view.aspx';
const ENDPOINT_PRODUCTION = 'https://server.cpmstar.com/view.aspx';

const DEFAULT_TTL = 300;
const DEFAULT_CURRENCY = 'USD';
Expand Down
2 changes: 1 addition & 1 deletion modules/datablocksBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export const spec = {
Object.keys(sourceIds).forEach(sourceId => {
let impObj = sourceIds[sourceId];
collection.push({
url: `${impObj.protocol}${host}/${impObj.path}/?${impObj.idParam}=${sourceId}`,
url: `https://${host}/${impObj.path}/?${impObj.idParam}=${sourceId}`,
body: {
id: bidderRequest.auctionId,
imp: impObj.imps,
Expand Down
2 changes: 1 addition & 1 deletion modules/djaxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {Renderer} from '../src/Renderer';
const SUPPORTED_AD_TYPES = [BANNER, VIDEO];
const BIDDER_CODE = 'djax';
const DOMAIN = 'https://demo.reviveadservermod.com/headerbidding_adminshare/';
const RENDERER_URL = '//acdn.adnxs.com/video/outstream/ANOutstreamVideo.js';
const RENDERER_URL = 'https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js';

function isBidRequestValid(bid) {
return (typeof bid.params !== 'undefined' && parseInt(utils.getValue(bid.params, 'publisherId')) > 0);
Expand Down
2 changes: 1 addition & 1 deletion modules/ebdrBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const spec = {
};
return {
method: 'GET',
url: '//' + rtbServerDomain + '/hb?' + '&zoneid=' + zoneid + '&br=' + encodeURIComponent(JSON.stringify(ebdrBidReq)),
url: 'https://' + rtbServerDomain + '/hb?' + '&zoneid=' + zoneid + '&br=' + encodeURIComponent(JSON.stringify(ebdrBidReq)),
bids: ebdrReq
};
},
Expand Down
2 changes: 1 addition & 1 deletion modules/etargetBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const spec = {
request.push(formRequestUrl(reqParams));
}

request.unshift('//' + lastCountry + '.search.etargetnet.com/hb/?hbget=1');
request.unshift('https://' + lastCountry + '.search.etargetnet.com/hb/?hbget=1');
netRevenue = 'net';

if (bidderRequest && bidderRequest.gdprConsent && bidderRequest.gdprConsent.gdprApplies) {
Expand Down
Loading

0 comments on commit 3164cfa

Please sign in to comment.