Joel Joel Binks
Joel Joel Binks

Reputation: 1676

Laravel 5.1 - how to send out through a proxy?

I have Laravel set up in a qa environment on AWS. All of its outgoing traffic needs to go through a proxy, but I don't know where to set this in Laravel configuration. I need to send email and talk to an s3 bucket but I wanted to know if there is some global configuration where you can specify an outgoing proxy. Does such a setting exist?

Upvotes: 0

Views: 1484

Answers (2)

Balazs Szabo
Balazs Szabo

Reputation: 51

In the filesystems.php You can setup like this:

    's3' => [
        'driver' => 's3',
        'key' => env('AWS_ACCESS_KEY_ID', ''),
        'secret' => env('AWS_SECRET_ACCESS_KEY', ''),
        'region' => env('AWS_REGION', ''),
        'bucket' => env('AWS_BUCKET', 'AWS_BUCKET'),
        'http'    => [
            'proxy' => 'http://' . env('WEBPROXY_HOST') . ':' . env('WEBPROXY_PORT')
        ]
    ],

Don't forget set the enviroment variables in the .env file...

Upvotes: 2

Joel Joel Binks
Joel Joel Binks

Reputation: 1676

The answer is there is no answer for this. We had to go underneath Laravel into php-fpm and configure the proxy settings.

Upvotes: 1

Related Questions