Closed mzur closed 7 years ago
I found a better solution: Guzzle respects the HTTP_PROXY
and HTTPS_PROXY
environment variables. These can be set in the .env
file. The stream_context_set_default
configuration then is done only if the HTTP_PROXY
environment variable is set. This configures both Guzzle and readfile()
etc. correctly with a simple change in the .env
file.
Some hosts might require a special proxy configuration to be able to make outgoing HTTP requests. With remote transects, outgoing HTTP requests are a requirement for BIIGLE.
Add a new
config/http.php
file with the following proxy settings:Use these settings to set the proxy in the
AppServiceProvider
like this:Maybe this makes the extra proxy settings of the SOAP client of the label trees module obsolete.
Also, check if GuzzleHttp really is a requirement. We only need id for remote transect URL validation now. Maybe native PHP functions can be used for this, too. One plus for Guzzle is better testability.
Guzzle is not affected by the above settings, though, since it uses cURL if it is installed. Maybe set global cURL options, too, or not use Guzzle.
Once finished, remove the workaround in the Cebitec instance.