-
-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Axios Proxy Issues - 501 and SSL errors #3459
Copy link
Copy link
Closed
Description
Describe the bug
Getting weird error messages when passing a proxy into an Axios request. I've tried to add a proxy parameter to the following GET request and I get a 501 error code and when I then add a protocol parameter to the proxy object I get an openssl error
Note that I don't have any of these issues when using the library axios-https-proxy-fix, https://www.npmjs.com/package/axios-https-proxy-fix
To Reproduce
axios
.get(prod, {
proxy: {
host: proxy.host,
port: proxy.port,
auth: {
username: proxy.userName,
password: proxy.password,
},
}
})Then I tried adding protocol to the proxy object, like so:
axios
.get(prod, {
proxy: {
protocol: "https",
host: proxy.host,
port: proxy.port,
auth: {
username: proxy.userName,
password: proxy.password,
},
}
})Error:
write EPROTO 17828:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:Expected behavior
No 501 and no openssl issues. Should get a 200 response.
Environment
- Axios Version 0.21.0
- Node.js Version 12.17
- OS: Windows 10
Additional context/Screenshots
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels