Skip to content

Commit

Permalink
Fix NO_PROXY settings (#3117)
Browse files Browse the repository at this point in the history
  • Loading branch information
gergokee committed Apr 17, 2023
1 parent 242f128 commit c6f3a35
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Handler/CurlFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,9 @@ private function applyHandlerOptions(EasyHandle $easy, array &$conf): void
$scheme = $easy->request->getUri()->getScheme();
if (isset($options['proxy'][$scheme])) {
$host = $easy->request->getUri()->getHost();
if (!isset($options['proxy']['no']) || !Utils::isHostInNoProxy($host, $options['proxy']['no'])) {
if (isset($options['proxy']['no']) && Utils::isHostInNoProxy($host, $options['proxy']['no'])) {
unset($conf[\CURLOPT_PROXY]);
} else {
$conf[\CURLOPT_PROXY] = $options['proxy'][$scheme];
}
}
Expand Down

0 comments on commit c6f3a35

Please sign in to comment.