server/src/config/guzzle.php
changeset 531 48f5380c26d0
equal deleted inserted replaced
530:a76bae4795d5 531:48f5380c26d0
       
     1 <?php
       
     2 
       
     3 $config = [];
       
     4 
       
     5 if ($http_proxy = env('HTTP_PROXY')) {
       
     6     $config['proxy']['http'] = $http_proxy;
       
     7 }
       
     8 
       
     9 if ($https_proxy = env('HTTPS_PROXY')) {
       
    10     $config['proxy']['https'] = $https_proxy;
       
    11 }
       
    12 
       
    13 if ($noProxy = env('NO_PROXY')) {
       
    14     $cleanedNoProxy = str_replace(' ', '', $noProxy);
       
    15     $config['proxy']['no'] = explode(',', $cleanedNoProxy);
       
    16 }
       
    17 
       
    18 return $config;