Adding basic authentication to http header with mvt
Is there a way to add basic authentication to mvt requests as well? I can see in the examples it is done when fetching .pmtiles, but can it be done with e.g.
https://api.protomaps.com/tiles/v3/{z}/{x}/{y}.mvt?key=1003762824b9687f (from example)
Passing the key in the url is not safe nor supported by the tile server we use. Thanks!
Passing the key in the url is not safe
If you are using HTTPS then basic authentication should be as safe as passing the key in the URL.
Making this work in this library would require extending a bunch of internal APIs and maplibre gl js already does this, can you use that instead?
There are few cases where HTTP headers are considered safer (e.g. browser cache), but I'll take a look at the options if it is not feasible to add it to this library. Thanks for the quick reply!