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

Request options updated to send session cookie and avoid CORS preflight #2840

Merged
merged 5 commits into from
Jul 24, 2018

Conversation

monofonik
Copy link
Contributor

Type of change

  • Bugfix
  • Feature
  • New bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Does this change affect user-facing APIs or examples documented on http://prebid.org?
  • Other

Description of change

  • withCredentials option set to ensure cookies are sent with bid requests to our endpoint
  • contentType set to text/plain to avoid the CORS preflight request
  • test parameters for validating bids
{
  bidder: '<bidder name>',
  params: {
    // ...
  }
}

Be sure to test the integration with your adserver using the Hello World sample page.

  • contact email of the adapter’s maintainer
  • official adapter submission

For any changes that affect user-facing APIs or example code documented on http://prebid.org, please provide:

Other information

set withCredentials option to ensure cookies are sent with bid requests
@@ -44,8 +44,8 @@ export const spec = {
};

const options = {
contentType: 'application/json',
withCredentials: false
contentType: 'text/plain',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are the default options in bidderFactory for a POST request. You can just remove the options property.
See: https://github.com/prebid/Prebid.js/blob/master/src/adapters/bidderFactory.js#L260

@monofonik
Copy link
Contributor Author

monofonik commented Jul 12, 2018

Thanks @mkendall07 PR updated with options removed. Also added our usersync pixel - not sure if you prefer separate PRs for multiple small / unrelated changes?

@monofonik
Copy link
Contributor Author

@mkendall07 just checking if there's anything else we need to action here?

Copy link
Member

@mkendall07 mkendall07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mkendall07 mkendall07 merged commit 9170cec into prebid:master Jul 24, 2018
florevallatmrf pushed a commit to Marfeel/Prebid.js that referenced this pull request Sep 6, 2018
…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
StefanWallin pushed a commit to mittmedia/Prebid.js that referenced this pull request Sep 28, 2018
…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
ghost pushed a commit to devunrulymedia/Prebid.js that referenced this pull request Jan 30, 2019
…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
AlessandroDG pushed a commit to simplaex/Prebid.js that referenced this pull request Mar 26, 2019
…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
AlessandroDG pushed a commit to simplaex/Prebid.js that referenced this pull request Mar 26, 2019
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants