Skip to content

Commit 37ea632

Browse files
pro-nskArtem KostritsaAlexander Kascheev
authored andcommitted
Qwarry Bid Adapter: add referer detection (prebid#6412)
* qwarry bid adapter * formatting fixes * fix tests for qwarry * qwarry bid adapter * add header for qwarry bid adapter * bid requests fix * fix tests * response fix * fix tests for Qwarry bid adapter * add pos parameter to qwarry bid adapter * qwarryBidAdapter onBidWon hotfix * Change bidder endpoint url for Qwarry adapter * add referer JS detection * use bidderRequest.refererInfo * fix tests Co-authored-by: Artem Kostritsa <[email protected]> Co-authored-by: Alexander Kascheev <[email protected]>
1 parent 46b3d40 commit 37ea632

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

modules/qwarryBidAdapter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const spec = {
2727
return {
2828
method: 'POST',
2929
url: ENDPOINT,
30-
data: { requestId: bidderRequest.bidderRequestId, bids },
30+
data: { requestId: bidderRequest.bidderRequestId, bids, referer: bidderRequest.refererInfo.referer },
3131
options: {
3232
contentType: 'application/json',
3333
customHeaders: {

test/spec/modules/qwarryBidAdapter_spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@ describe('qwarryBidAdapter', function () {
7070

7171
describe('buildRequests', function () {
7272
let bidRequests = [REQUEST]
73-
const bidderRequest = spec.buildRequests(bidRequests, { bidderRequestId: '123' })
73+
const bidderRequest = spec.buildRequests(bidRequests, { bidderRequestId: '123', refererInfo: { referer: 'http://test.com/path.html' } })
7474

7575
it('sends bid request to ENDPOINT via POST', function () {
7676
expect(bidderRequest.method).to.equal('POST')
7777
expect(bidderRequest.data.requestId).to.equal('123')
78+
expect(bidderRequest.data.referer).to.equal('http://test.com/path.html')
7879
expect(bidderRequest.data.bids).to.deep.contains({ bidId: '456', zoneToken: 'e64782a4-8e68-4c38-965b-80ccf115d46f', pos: 7 })
7980
expect(bidderRequest.options.customHeaders).to.deep.equal({ 'Rtb-Direct': true })
8081
expect(bidderRequest.options.contentType).to.equal('application/json')

0 commit comments

Comments
 (0)