-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use identifying user-agent for nominatim: Prevents requests being blo…
…cked
- Loading branch information
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,11 @@ class NominatimGeoCodeService implements GeoCodeService { | |
* @param $addressString | ||
* | ||
* @return ?Location | ||
* @throws \Exception | ||
*/ | ||
public function getAddressData( $addressString ): ?Location { | ||
$defaultUserAgent = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0'; | ||
|
||
$defaultUserAgent = 'CommonsBooking v.' . COMMONSBOOKING_VERSION . " Contact: [email protected]"; | ||
|
||
$client = new Client( | ||
null, | ||
|
@@ -49,4 +51,4 @@ public function getAddressData( $addressString ): ?Location { | |
|
||
return null; | ||
} | ||
} | ||
} |