diff --git a/config/bugsnag.php b/config/bugsnag.php index 93572a94..45636329 100644 --- a/config/bugsnag.php +++ b/config/bugsnag.php @@ -99,7 +99,6 @@ */ 'proxy' => array_filter([ - 'http' => env('HTTP_PROXY'), 'https' => env('HTTPS_PROXY'), 'no' => explode(',', str_replace(' ', '', env('NO_PROXY', ''))) ?: null, ]), diff --git a/src/BugsnagServiceProvider.php b/src/BugsnagServiceProvider.php index c3519dab..fb55d9f0 100644 --- a/src/BugsnagServiceProvider.php +++ b/src/BugsnagServiceProvider.php @@ -70,6 +70,10 @@ public function register() $options = ['base_uri' => isset($config['endpoint']) ? $config['endpoint'] : Client::ENDPOINT]; if (isset($config['proxy']) && $config['proxy']) { + if (isset($config['proxy']['http']) && php_sapi_name() != 'cli') { + unset($config['proxy']['http']); + } + $options['proxy'] = $config['proxy']; }