Skip to content

CDP Mode Requests with Nginx #3911

@benjaminsaff

Description

@benjaminsaff

I am running into an interesting situation: The browser is running on a machine with an Nginx proxy and I am using cdp mode to connect to this running browser. I was getting the "Failed to connect to the browser". Manually trying the request to /json/version with curl worked.
I noticed the method is defined as a lowercase get by default in here: https://github.com/seleniumbase/SeleniumBase/blob/v4.40.7/seleniumbase/undetected/cdp_driver/browser.py#L938 and it looks like urllib is sending the method unmodified and Nginx seems to be strict with this and expects a GET.

Has this ever came up? Changing it to all caps worked. Is it possible to patch the code?

Metadata

Metadata

Assignees

Labels

UC Mode / CDP ModeUndetected Chromedriver Mode / CDP ModeenhancementMaking things better

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions