src/Control/InitialisationMiddleware.php
protected function configureEgressProxy()
    {
        if (!Environment::getEnv('SS_OUTBOUND_PROXY')
            || !Environment::getEnv('SS_OUTBOUND_PROXY_PORT')
        ) {
            return;
        }

        $proxy = Environment::getEnv('SS_OUTBOUND_PROXY');
        $proxyPort = Environment::getEnv('SS_OUTBOUND_PROXY_PORT');

        /*
         * This sets the environment variables so they are available in
         * external calls executed by exec() such as curl.
         * Environment::setEnv() would only availabe in context of SilverStripe.
         * Environment::getEnv() will fallback to getenv() and will therefore
         * fetch the variables
         */
        putenv('http_proxy=' .  $proxy . ':' . $proxyPort);
        putenv('https_proxy=' . $proxy . ':' . $proxyPort);
    }
protected function configureEgressProxy()
    {
        if (!Environment::getEnv('SS_OUTBOUND_PROXY')
            || !Environment::getEnv('SS_OUTBOUND_PROXY_PORT')
        ) {
            return;
        }

        $proxy = Environment::getEnv('SS_OUTBOUND_PROXY');
        $proxyPort = Environment::getEnv('SS_OUTBOUND_PROXY_PORT');

        /*
         * This sets the environment variables so they are available in
         * external calls executed by exec() such as curl.
         * Environment::setEnv() would only availabe in context of SilverStripe.
         * Environment::getEnv() will fallback to getenv() and will therefore
         * fetch the variables
         */
        putenv('http_proxy=' .  $proxy . ':' . $proxyPort);
        putenv('https_proxy=' . $proxy . ':' . $proxyPort);
    }
protected function configureEgressProxy ( ) { if ( ! Environment :: getEnv ( 'SS_OUTBOUND_PROXY' ) || ! Environment :: getEnv ( 'SS_OUTBOUND_PROXY_PORT' ) ) { return ; } $ proxy = Environment :: getEnv ( 'SS_OUTBOUND_PROXY' ) ; $ proxyPort = Environment :: getEnv ( 'SS_OUTBOUND_PROXY_PORT' ) ; /*
         * This sets the environment variables so they are available in
         * external calls executed by exec() such as curl.
         * Environment::setEnv() would only availabe in context of SilverStripe.
         * Environment::getEnv() will fallback to getenv() and will therefore
         * fetch the variables
         */ putenv ( 'http_proxy=' . $ proxy . ':' . $ proxyPort ) ; putenv ( 'https_proxy=' . $ proxy . ':' . $ proxyPort ) ; }
If the outbound egress proxy details have been defined in environment variables, configure the proxy
variables that are used to configure it.
If the outbound egress proxy details have been defined in environment variables configure the proxy variables that are used to configure it .