I am not sure about Bing Maps, but Mapbox allows access tokens to have scope and domain restrictions, thus making it safe to use client-side from javascript packages like openlayers (or mapbox-gl-js)
https://docs.mapbox.com/help/account/tokens/ https://docs.mapbox.com/mapbox-gl-js/example/simple-map/ On Tue, Sep 3, 2019 at 2:42 AM Geir Aalberg <[email protected]> wrote: > > The canonical way of handling API keys is to set up a backend on your > server which adds the keys and acts as a proxy. There is no secure way > to hide API keys in Javascript apps on the browser. > > https://www.rockyourcode.com/secret-keys-in-react/ > > -geir > > > On 8/30/19 09:21, divya mittal wrote: > > Hi, > > > > I have started using openlayers recently and using Bing maps as baselayer. > > > > While consuming Bing Maps I need to specify the key at the client side. Is > > there a way out to hide the Bing map key ? > > > > Please advise. > > > > Thanks ! > _______________________________________________ > Users mailing list > [email protected] > https://lists.osgeo.org/mailman/listinfo/openlayers-users -- Alex G Rice [email protected] +1 505-603-5639 _______________________________________________ Users mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/openlayers-users
