Force ipv4 resolv for calls to google maps api #113

This commit is contained in:
Kendrick Chan 2018-05-07 22:57:08 +08:00
parent dcebb71174
commit 7f7707d827

View file

@ -52,7 +52,12 @@ class MapTools
// query google maps api
$res = $client->request('GET', $maps_url, ['query' => $gmaps_params]);
$res = $client->request('GET', $maps_url, [
'query' => $gmaps_params,
'curl' => [
CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4
],
]);
return $res->getBody();
}