server/src/config/guzzle.php
author ymh <ymh.work@gmail.com>
Mon, 16 Oct 2017 15:22:08 +0200
changeset 552 2c579ea45608
parent 531 48f5380c26d0
permissions -rw-r--r--
Add email and description in handle registry entries

<?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;