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

Force ixBidAdapter to always use the secure endpoint - Please do not accept before Thurs, Oct 17th 9AM EST #4323

Merged
merged 3 commits into from
Oct 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 1 addition & 9 deletions modules/ixBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { registerBidder } from '../src/adapters/bidderFactory';

const BIDDER_CODE = 'ix';
const BANNER_SECURE_BID_URL = 'https://as-sec.casalemedia.com/cygnus';
const BANNER_INSECURE_BID_URL = 'http://as.casalemedia.com/cygnus';
const SUPPORTED_AD_TYPES = [BANNER];
const ENDPOINT_VERSION = 7.2;
const CENT_TO_DOLLAR_FACTOR = 100;
Expand Down Expand Up @@ -188,10 +187,7 @@ export const spec = {
let validBidRequest = null;
let bannerImp = null;

// Always start by assuming the protocol is HTTPS. This way, it will work
// whether the page protocol is HTTP or HTTPS. Then check if the page is
// actually HTTP.If we can guarantee it is, then, and only then, set protocol to
// HTTP.
// Always use secure HTTPS protocol.
let baseUrl = BANNER_SECURE_BID_URL;

for (let i = 0; i < validBidRequests.length; i++) {
Expand Down Expand Up @@ -258,10 +254,6 @@ export const spec = {

if (options.refererInfo) {
r.site.page = options.refererInfo.referer;

if (options.refererInfo.referer && options.refererInfo.referer.indexOf('https') !== 0) {
baseUrl = BANNER_INSECURE_BID_URL;
}
}
}

Expand Down
3 changes: 1 addition & 2 deletions test/spec/modules/ixBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { newBidder } from 'src/adapters/bidderFactory';
import { spec } from 'modules/ixBidAdapter';

describe('IndexexchangeAdapter', function () {
const IX_INSECURE_ENDPOINT = 'http://as.casalemedia.com/cygnus';
const IX_SECURE_ENDPOINT = 'https://as-sec.casalemedia.com/cygnus';
const BIDDER_VERSION = 7.2;

Expand Down Expand Up @@ -401,7 +400,7 @@ describe('IndexexchangeAdapter', function () {

it('request should be made to IX endpoint with GET method', function () {
expect(requestMethod).to.equal('GET');
expect(requestUrl).to.equal(IX_INSECURE_ENDPOINT);
expect(requestUrl).to.equal(IX_SECURE_ENDPOINT);
});

it('query object (version, siteID and request) should be correct', function () {
Expand Down