-
Notifications
You must be signed in to change notification settings - Fork 135
Follow up #592 #597
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
Follow up #592 #597
Conversation
3f0b937
to
c5c081e
Compare
} else if (target.protocol.startsWith("https")) { | ||
proxyOptions.secure = true; | ||
proxyOptions.agent = this.httpsAgent; | ||
} else if (target.protocol.startsWith("http")) { | ||
proxyOptions.secure = false; | ||
proxyOptions.agent = this.httpAgent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more robust to close the set of protocols.
var proxyOptions = { target }; | ||
|
||
if (target.protocol.startsWith("unix")) { | ||
// No need for agents for unix sockets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment belongs here.
proto = "http"; | ||
target = "unix+" + proto + "://" + unixSocketPath; | ||
} else { | ||
proto = sslOptions ? "https" : "http"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force HTTP for unix
Great, thanks! |
I performed a review of #592, but without admin privs the changes were only on my fork. This PR follows up #592 with my suggestions!