Commit 94388def authored by Eduardo Boucas's avatar Eduardo Boucas
Browse files

Add proxy information to AWS SDK config

parent 1660d0b9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -142,6 +142,10 @@ class S3_Uploads {
			$params['region'] = $this->region;
		}

		if ( defined('WP_PROXY_HOST') && defined('WP_PROXY_PORT') ) {
			$params['request.options']['proxy'] = WP_PROXY_HOST . ':' . WP_PROXY_PORT;
		}

		$params = apply_filters( 's3_uploads_s3_client_params', $params );

		$this->s3 = Aws\Common\Aws::factory( $params )->get( 's3' );