Custom Online maps: Extra Headers

Sonny shared this question 2 days ago
In Progress

As described in the manual https://docs.locusmap.app/doku.php?id=manual:advanced:customization:online_maps#specifications_of_map_definition we can add or modify the Header information. This is e.g important if we need some kind of Authorisation to load a map. So adding or modifying header fields like "User-Agent", "Referer", "Cookies" is essential.

"Referer" already works.
"User-Agent" (not working any more?) at least I was not able to send my own string, Map-Server receives the standard "Locus Map..." User-Agent.

"Cookies" (I'm not sure? Please describe in the manual how to send a list of cookies, eg: "Cky1"="The first value" and "Cky2"="The second value")

In general please improve explanation of "extraHeader" in the manual:
- How to use more than 1 extraHeader: by using several <extraHeader>-Lines, or just using 1 line and separate the Headers?
- How to note strings containing spaces (" ") or other special characters?

Replies (1)

photo
1

Hello Sonny,

good questions, thanks for it. @Michal Stupka will improve the manual based on discussion here for sure 😉.

- "user-agent" > it has been a long time since I'm blocking custom user agents. It caused a lot of troubles on OSM servers mainly that Locus Map was used for some mass downloading thanks to faking of user-agent. No more, sorry. There should be no need to prevent Locus Map inform the server correctly.

- "extraHeader" > try inserting more lines with this tag. Simply one custom header in a one "extraHeader" tag.

- "cookies" > hmm, how should they be send to server? The same as custom headers? If so, simply use "extraHeader".

Leave a Comment
 
Attach a file