Skip to content

Commit

Permalink
StroeerCore Bid Adapter: remove 'ssl' flag from request payload
Browse files Browse the repository at this point in the history
  • Loading branch information
philipwatson committed Jun 4, 2024
1 parent a99e1ee commit 93c6b94
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
2 changes: 0 additions & 2 deletions modules/stroeerCoreBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const DEFAULT_PROTOCOL = 'https';
const _externalCrypter = new Crypter('c2xzRWh5NXhpZmxndTRxYWZjY2NqZGNhTW1uZGZya3Y=', 'eWRpdkFoa2tub3p5b2dscGttamIySGhkZ21jcmg0Znk=');
const _internalCrypter = new Crypter('1AE180CBC19A8CFEB7E1FCC000A10F5D892A887A2D9=', '0379698055BD41FD05AC543A3AAAD6589BC6E1B3626=');

const isSecureWindow = () => utils.getWindowSelf().location.protocol === 'https:';
const isMainPageAccessible = () => getMostAccessibleTopWindow() === utils.getWindowTop();

function getStroeerCore() {
Expand Down Expand Up @@ -195,7 +194,6 @@ export const spec = {
const commonPayload = {
id: utils.generateUUID(),
ref: refererInfo.ref,
ssl: isSecureWindow(),
mpa: isMainPageAccessible(),
ver: getVersionValues(win),
timeout: bidderRequest.timeout - (Date.now() - bidderRequest.auctionStart),
Expand Down
24 changes: 8 additions & 16 deletions test/spec/modules/stroeerCoreBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,12 @@ describe('stroeerCore bid adapter', function() {

const createWindow = (href, params = {}) => {
let { parent, referrer, top, frameElement, placementElements = [] } = params;
const protocol = href.startsWith('https') ? 'https:' : 'http:';
const win = {
frameElement,
parent,
top,
location: {
protocol, href
href
},
document: {
createElement: function() {
Expand All @@ -239,13 +238,8 @@ describe('stroeerCore bid adapter', function() {

win.self = win;

if (!parent) {
win.parent = win;
}

if (!top) {
win.top = win;
}
win.parent = parent ?? top ?? win;
win.top = top ?? parent ?? win;

return win;
};
Expand All @@ -263,7 +257,7 @@ describe('stroeerCore bid adapter', function() {

function setupSingleWindow(sandBox, placementElements = [createElement('div-1', 17), createElement('div-2', 54)]) {
const win = createWindow('http://www.xyz.com/', {
parent: win, top: win, frameElement: createElement(undefined, 304), placementElements: placementElements
frameElement: createElement(undefined, 304), placementElements: placementElements
});

win.innerHeight = 200;
Expand Down Expand Up @@ -521,13 +515,12 @@ describe('stroeerCore bid adapter', function() {
});

describe('payload on server request info object', () => {
let topWin;
let win;

let placementElements;
beforeEach(() => {
placementElements = [createElement('div-1', 17), createElement('div-2', 54)];
({ topWin, win } = setupNestedWindows(sandbox, placementElements));
({ win } = setupNestedWindows(sandbox, placementElements));
win.YLHH = buildFakeYLHH({
'137': 'div-1',
'248': 'div-2'
Expand Down Expand Up @@ -557,7 +550,6 @@ describe('stroeerCore bid adapter', function() {
'timeout': expectedTimeout,
'ref': 'https://www.example.com/?search=monkey',
'mpa': true,
'ssl': false,
'url': 'https://www.example.com/monkey/index.html',
'bids': [{
'sid': 'NDA=',
Expand Down Expand Up @@ -1184,8 +1176,8 @@ describe('stroeerCore bid adapter', function() {

it('should add the bid transaction id', () => {
const bidReq = buildBidderRequest();
const uuid0 = "f9545c4c-7d3f-4941-9319-d515af162085";
const uuid1 = "8ce92d85-e9b0-4682-8025-bf58d452b2a7";
const uuid0 = 'f9545c4c-7d3f-4941-9319-d515af162085';
const uuid1 = '8ce92d85-e9b0-4682-8025-bf58d452b2a7';

bidReq.bids[0].transactionId = uuid0;
bidReq.bids[1].transactionId = uuid1;
Expand Down Expand Up @@ -1294,7 +1286,7 @@ describe('stroeerCore bid adapter', function() {

it('should add the source transaction id', () => {
const bidReq = buildBidderRequest();
const tid = "7c3c82b2-30bb-49dc-9e3b-0148cd769a28";
const tid = '7c3c82b2-30bb-49dc-9e3b-0148cd769a28';

const ortb2 = {
source: {
Expand Down

0 comments on commit 93c6b94

Please sign in to comment.