Skip to content
Snippets Groups Projects
Commit 971d84e2 authored by Ere Maijala's avatar Ere Maijala Committed by Robert Lange
Browse files

refs #22611 [finc] backport proxy excemptions

* VF8 Make it possible to define the local address pattern for bypassing proxy. (#2604)
parent 76f9d821
Branches
Tags
No related merge requests found
......@@ -1313,8 +1313,16 @@ url = https://www.myendnoteweb.com/EndNoteWeb.html
;host = your.proxy.server
;port = 8000
; Uncomment following line to set proxy type to SOCKS 5
; Uncomment one of the following lines to set proxy type to SOCKS 5 or SOCKS 5 with
; name resolution done by proxy. Setting either of these will make VuFind use the
; curl adapter for HTTP requests.
;type = socks5
;type = socks5_hostname
; This setting can be used to define a reqular expression pattern for addresses that
; should be considered local and bypass proxy when making requests. Default is:
;local_addresses = "@^(localhost|127(\.\d+){3}|\[::1\])@"
; Following example bypasses also any address starting with '192.168.':
;local_addresses = "@^(localhost|127(\.\d+){3}|\[::1\]|192\.168\.)@"
; Default HTTP settings can be loaded here. These values will be passed to
; the \Zend\Http\Client's setOptions method.
......
......@@ -1327,8 +1327,16 @@ url = https://www.myendnoteweb.com/EndNoteWeb.html
;host = your.proxy.server
;port = 8000
; Uncomment following line to set proxy type to SOCKS 5
;type = socks5
; Uncomment one of the following lines to set proxy type to SOCKS 5 or SOCKS 5 with
; name resolution done by proxy. Setting either of these will make VuFind use the
; curl adapter for HTTP requests.
; type = socks5
; type = socks5_hostname
; This setting can be used to define a reqular expression pattern for addresses that
; should be considered local and bypass proxy when making requests. Default is:
; local_addresses = "@^(localhost|127(\.\d+){3}|\[::1\])@"
; Following example bypasses also any address starting with '192.168.':
; local_addresses = "@^(localhost|127(\.\d+){3}|\[::1\]|192\.168\.)@"
; Default HTTP settings can be loaded here. These values will be passed to
; the \Zend\Http\Client's setOptions method.
......
......@@ -75,6 +75,8 @@ class HttpServiceFactory implements FactoryInterface
}
$defaults = isset($config->Http)
? $config->Http->toArray() : [];
return new $requestedName($options, $defaults);
$config = !empty($config->Proxy->local_addresses)
? ['localAddressesRegEx' => $config->Proxy->local_addresses] : [];
return new $requestedName($options, $defaults, $config);
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment