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

Adagio Bid Adapter: remove referrer. reachedTop validation #7939

Merged
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
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