Skip to content

Commit

Permalink
Request options updated to send session cookie and avoid CORS preflig…
Browse files Browse the repository at this point in the history
…ht (prebid#2840)

* use content-type text/plain to avoid preflight CORS request
set withCredentials option to ensure cookies are sent with bid requests

* removed unnecessary options

* reverted package-lock.json changes

* added pxyz user sync pixel
  • Loading branch information
monofonik authored and AdSpacesDevelopers committed Jan 30, 2019
1 parent 64f8c63 commit 65deb20
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modules/playgroundxyzBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ export const spec = {
imp: bidRequests.map(mapImpression)
};

const options = {
contentType: 'application/json',
withCredentials: false
};

if (bidderRequest && bidderRequest.gdprConsent) {
payload.user = {ext: {consent: bidderRequest.gdprConsent.consentString}};
const gdpr = bidderRequest.gdprConsent.gdprApplies ? 1 : 0;
Expand All @@ -58,7 +53,6 @@ export const spec = {
method: 'POST',
url: URL,
data: JSON.stringify(payload),
options,
bidderRequest
};
},
Expand Down Expand Up @@ -106,6 +100,12 @@ export const spec = {
url: '//acdn.adnxs.com/ib/static/usersync/v3/async_usersync.html'
}];
}
if (syncOptions.pixelEnabled) {
return [{
type: 'pixel',
url: '//ib.adnxs.com/getuidnb?https://ads.playground.xyz/usersync?partner=appnexus&uid=$UID'
}];
}
}
}

Expand Down

0 comments on commit 65deb20

Please sign in to comment.