Skip to content

Commit

Permalink
Add session header to map tiles download (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Sep 11, 2023
1 parent 285cd71 commit 9838cfa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions leafmap/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -9085,6 +9085,14 @@ def map_tiles_to_geotiff(

SESSION = requests.Session()

SESSION.headers.update(
{
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0",
}
)

xyz_tiles = {
"OPENSTREETMAP": {
"url": "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
Expand Down

0 comments on commit 9838cfa

Please sign in to comment.