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

how to send headers in leaflet wms tile requests? #16

Open
smahamed opened this issue Nov 8, 2023 · 1 comment
Open

how to send headers in leaflet wms tile requests? #16

smahamed opened this issue Nov 8, 2023 · 1 comment

Comments

@smahamed
Copy link

smahamed commented Nov 8, 2023

No description provided.

@smartm0use
Copy link

This way?

let wmsLayer: L.TileLayer.WMSHeader = L.TileLayer.wmsHeader(
    'https://GEOSERVER_PATH/geoserver/wms?',
    {
        layers: layers,
        format: 'image/png',
        transparent: true,
    }, [
        { header: 'Authorization', value: 'JWT ' + MYAUTHTOKEN },
        { header: 'content-type', value: 'text/plain'},
    ],
    null,
    null
).addTo(map);

As stated in the readme.

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

2 participants