Skip to content

Commit

Permalink
Adagio: remove referrer. reachedTop validation (#7939)
Browse files Browse the repository at this point in the history
  • Loading branch information
osazos authored Jan 14, 2022
1 parent d26211f commit dabba16
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
8 changes: 0 additions & 8 deletions modules/adagioBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,6 @@ function getSite(bidderRequest) {
} else if (refererInfo.stack && refererInfo.stack.length && refererInfo.stack[0]) {
// important note check if refererInfo.stack[0] is 'thruly' because a `null` value
// will be considered as "localhost" by the parseUrl function.
// As the isBidRequestValid returns false when it does not reach the referer
// this should never called.
const url = parseUrl(refererInfo.stack[0]);
domain = url.hostname;
}
Expand Down Expand Up @@ -873,12 +871,6 @@ export const spec = {

autoFillParams(bid);

if (!internal.getRefererInfo().reachedTop) {
logWarn(`${LOG_PREFIX} the main page url is unreachabled.`);
// internal.enqueue(debugData());
return false;
}

if (!(bid.params.organizationId && bid.params.site && bid.params.placement)) {
logWarn(`${LOG_PREFIX} at least one required param is missing.`);
// internal.enqueue(debugData());
Expand Down
2 changes: 1 addition & 1 deletion modules/adagioBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Below, the list of Adagio params and where they can be set.
| ---------- | ------------- | ------------- |
| siteId | x |
| organizationId (obsolete) | | x
| site (obsolete) | | x
| site (obsolete) | | x
| pagetype | x | x
| environment | x | x
| category | x | x
Expand Down
10 changes: 0 additions & 10 deletions test/spec/modules/adagioBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,6 @@ describe('Adagio bid adapter', () => {
expect(spec.isBidRequestValid(bid03)).to.equal(false);
expect(spec.isBidRequestValid(bid04)).to.equal(false);
});

it('should return false when refererInfo.reachedTop is false', function() {
sandbox.spy(utils, 'logWarn');
sandbox.stub(adagio, 'getRefererInfo').returns({ reachedTop: false });
const bid = new BidRequestBuilder().withParams().build();

expect(spec.isBidRequestValid(bid)).to.equal(false);
sinon.assert.callCount(utils.logWarn, 1);
sinon.assert.calledWith(utils.logWarn, 'Adagio: the main page url is unreachabled.');
});
});

describe('buildRequests()', function() {
Expand Down

0 comments on commit dabba16

Please sign in to comment.