mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-28 12:30:01 +02:00
Update API endpoint for GeoIP web services
MaxMind is beginning to enforce policies around its API endpoints. Endpoints should use the correct hostname for the product or service, and should always use HTTPS. [Release Note.](https://dev.maxmind.com/geoip/release-notes/2023#api-policies---temporary-enforcement-on-october-17-2023)
This commit is contained in:
parent
4ff0fea900
commit
7ff76a94a4
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ def get_location():
|
||||||
"""Return current location as latitude/longitude tuple."""
|
"""Return current location as latitude/longitude tuple."""
|
||||||
logger.debug("query MaxMind for location")
|
logger.debug("query MaxMind for location")
|
||||||
r = requests.get(
|
r = requests.get(
|
||||||
"https://www.maxmind.com/geoip/v2.1/city/me",
|
"https://geoip.maxmind.com/geoip/v2.1/city/me",
|
||||||
headers={"referer": "https://www.maxmind.com/en/locate-my-ip-address"},
|
headers={"referer": "https://www.maxmind.com/en/locate-my-ip-address"},
|
||||||
timeout=10,
|
timeout=10,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue