sahro
sahro

Reputation: 3

laravel 5.5 storage my file in Bucket aws S3 via proxy

I use Laravel 5.5 set up in docker environment . 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 file end export vers s3 bucket via proxy 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: 1256

Answers (1)

Alex
Alex

Reputation: 21

in your config/filesystems.php - add 'http' => [...

  's3' => [
            'driver' => 's3',
            'key' => env('AWS_KEY'),
            'secret' => env('AWS_SECRET'),
            'region' => env('AWS_REGION'),
            'bucket' => env('AWS_BUCKET'),
            'http'    => [
                 'proxy' => 'http://' . env('AWS_WEBPROXY_HOST') . ':' . env('AWS_WEBPROXY_PORT')
             ],
        ],

and don't forget to add your

AWS_WEBPROXY_HOST=... 
AWS_WEBPROXY_PORT=...

into the .env file

Upvotes: 1

Related Questions