Closed holtkamp closed 7 years ago
@holtkamp FYI
Nice! Minor doubt: why only "allow" a string? Guzzle itself also allows an array. Currently the type is not enforced, but the docs suggest it must be a string...
Also see: http://docs.guzzlephp.org/en/stable/request-options.html#proxy
@holtkamp, there is no use case for using an array at the moment. All requests will be to the same server and over https. So unless there is some hidden option in the proxy array it is useful for this SDK.
While it is true that setting a proxy to an array is allowed, it will break your context object.
ok, thanks for the explanation 👍
The Bunq API expects requests to be initiated from a fixed / whitelisted IP address, which is difficult in a "cloud" environment, with ever changing IP addresses.
A proxy can circumvent this problem and ensure a fixed IP address is used. However the current initialisation of the Guzzle client does not allow to set the
proxy
option.Also see this issue which discusses a similar situation: https://github.com/link0/bunq/issues/27