-
Notifications
You must be signed in to change notification settings - Fork 1k
Proxy silently ignored without http: #1282
Copy link
Copy link
Closed
Description
Basic Info
- Faraday Version: 1.4.1
- Ruby Version: 2.7
Issue description
Proxy silently ignored without http:. For example, if you set proxy to something:1234 it will be silently ignored. The correct proxy setting would be http://something:1234. This is an important issue because it's undocumented, difficult to debug, and can have serious consequences for crawling projects.
I propose either:
- In ProxyOptions.from, reject strings that lack a scheme.
or - In ProxyOptions.from, default to
http://for strings that lack a scheme.
Let me know if you agree with one of these options and I'l put together a PR. Thanks!
Steps to reproduce
> Faraday::ProxyOptions.from("something:1234").host
# => nil
> Faraday::ProxyOptions.from("http://something:1234").host
# => "something"Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels