grst / geos

Google Earth Overlay Server - display map overlays in Google Earth
https://grst.github.io/geos
BSD 3-Clause "New" or "Revised" License
42 stars 12 forks source link

Support additional HTTP headers for tiles. #11

Open grst opened 7 years ago

grst commented 7 years ago

e.g. strava heatmap and outdooractive block requests from google earth. This can be circumvented.

barbudor commented 4 years ago

Hi @grst Any timeline for supporting extra headers ? I would need to be able to add User-agent and Referer. I'm using such trick in MoBAC (using bsh) and LocusMapPro and it's very efficient to make some servers to work. Thanks

barbudor commented 4 years ago

Hi again @grst I looked in it to make a PR. I think I'm ok with reading a new tag extraHeader into the MapLayer class from the XML. Using syntax similar as LocusMap:

<extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36]]></extraHeader>
<extraHeader><![CDATA[Referer#https://www.geoportail.gouv.fr/carte]]></extraHeader>

But I can't seem to understand where the web request is performed to add those headers Any hint to help me ? Thanks

grst commented 4 years ago

Hi @barbudor,

I currently don't have time to actively maintain this project -- therefore, there are no timelines. But I'll gladly help you to make a PR.

I'm afraid it's a little more complicated. Web requests are made from different places, and only one is made directly from python:

If you are only interested in one part, I would also merge a PR ignoring the other parts, as it's at least a start for this feature.

Cheers, Gregor

barbudor commented 4 years ago

Hi Gregor

Many thanks. I think it's going to take a little time for me to find my way. I'll let you know

Best regards

barbudor