Open grst opened 7 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
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
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
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
e.g. strava heatmap and outdooractive block requests from google earth. This can be circumvented.