Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding request headers for VectorTileLayer? #802

Open
deeplook opened this issue Mar 11, 2021 · 5 comments
Open

Adding request headers for VectorTileLayer? #802

deeplook opened this issue Mar 11, 2021 · 5 comments

Comments

@deeplook
Copy link
Contributor

deeplook commented Mar 11, 2021

VectorTileLayer would benefit from a headers parameter to be passed to the HTTP requests made in order to pass some kind of tokens for example. I'm happy to work on this if somebody can help point me the right way. Maybe a plugin like https://github.com/ticinum-aerospace/leaflet-wms-header would be needed?

@stefano-xy
Copy link

Alternatively, something specific for the Authorization header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization).

@deeplook
Copy link
Contributor Author

It looks like Leaflet does in fact support passing headers, see Leaflet/Leaflet.VectorGrid#89. If so it should be possible to suport from ipyleaflet, rather easily, too, right?

@deeplook
Copy link
Contributor Author

@davidbrochart @martinRenou Any idea?

@stefano-xy
Copy link

Indeed, it would be a matter of exposing the possibility to configure the fetchOptions parameter of Leaflet.

@bkanuka
Copy link

bkanuka commented Jun 14, 2021

There's a bit of discussion about incorporating this with leaflet here: Leaflet/Leaflet#2091

Also a leaflet plugin (near the bottom of that thread) that can add headers: https://github.com/jaq316/leaflet-header

Hopefully this can make it easier to integrate into ipyleaflet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants