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

Add User-Agent with Puppeteer version to WebSocket request #5614

Merged
merged 4 commits into from Sep 15, 2021

Conversation

headlesstesting
Copy link
Contributor

This will add the User-Agent header to WebSocket requests, with the Puppeteer version.

The reason why we wanted to create this PR is because we can then offer our customers the most compatible browser version depending on the Puppeteer version they are using to connect to our service.

Developers use this method to connect to our service:
const browser = await puppeteer.connect({ browserWSEndpoint: 'wss://chrome.headlesstesting.com' })

When we receive a request, we can check the user-agent and determine the most compatible browser version.

This will add the User-Agent header to WebSocket requests.
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@headlesstesting
Copy link
Contributor Author

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

Copy link
Contributor

@jschfflr jschfflr left a comment

Choose a reason for hiding this comment

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

@headlesstesting This change looks good to me, thanks!

@jschfflr
Copy link
Contributor

@headlesstesting Can you resolve the conflicts? Happy to get this landed!

@google-cla
Copy link

google-cla bot commented Sep 11, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels Sep 11, 2021
@google-cla
Copy link

google-cla bot commented Sep 13, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@jschfflr
Copy link
Contributor

@googlebot I consent.

@jschfflr jschfflr enabled auto-merge (squash) September 15, 2021 07:06
@google-cla google-cla bot added cla: yes and removed cla: no labels Sep 15, 2021
@jschfflr jschfflr merged commit 6a2bf0a into puppeteer:main Sep 15, 2021
jschfflr pushed a commit to mushishi78/puppeteer that referenced this pull request Sep 16, 2021
…peteer#5614)

This will add the User-Agent header to WebSocket requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants