Skip to content
Snippets Groups Projects
Commit 3a789947 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Minor optimalization - Don't gather settings if we don't use them

Don't gather the proxy.auth setting if we don't use it
parent b34addd8
No related branches found
No related tags found
No related merge requests found
...@@ -362,11 +362,11 @@ class HTTP ...@@ -362,11 +362,11 @@ class HTTP
$config = \SimpleSAML_Configuration::getInstance(); $config = \SimpleSAML_Configuration::getInstance();
$proxy = $config->getString('proxy', null); $proxy = $config->getString('proxy', null);
$proxy_auth = $config->getString('proxy.auth', false);
if ($proxy !== null) { if ($proxy !== null) {
if (!isset($context['http']['proxy'])) { if (!isset($context['http']['proxy'])) {
$context['http']['proxy'] = $proxy; $context['http']['proxy'] = $proxy;
} }
$proxy_auth = $config->getString('proxy.auth', false);
if ($proxy_auth !== false) { if ($proxy_auth !== false) {
$context['http']['header'] = "Proxy-Authorization: Basic".base64_encode($proxy_auth); $context['http']['header'] = "Proxy-Authorization: Basic".base64_encode($proxy_auth);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment