server/src/config/guzzle.php
author ymh <ymh.work@gmail.com>
Thu, 16 Nov 2017 16:31:48 +0100
changeset 555 51023e5eae05
parent 531 48f5380c26d0
permissions -rw-r--r--
Added tag 0.0.24 for changeset f28a539ba106

<?php

$config = [];

if ($http_proxy = env('HTTP_PROXY')) {
    $config['proxy']['http'] = $http_proxy;
}

if ($https_proxy = env('HTTPS_PROXY')) {
    $config['proxy']['https'] = $https_proxy;
}

if ($noProxy = env('NO_PROXY')) {
    $cleanedNoProxy = str_replace(' ', '', $noProxy);
    $config['proxy']['no'] = explode(',', $cleanedNoProxy);
}

return $config;