#Exposing Google Maps API KEY

2 messages · Page 1 of 1 (latest)

velvet carbon
#

So far I am trying to use Google maps in the application, it works however I am exposing my API key

            src="https://maps.googleapis.com/maps/api/js?key=ITSHOWSMYAPIKEY&loading=async&callback=initMap">
    </script>```

how do I use the variable in the .env file to HIDE my environment variable from the front facing user
wild shell
#

maybe something has changed in their docs (maybe some new recommendations), but last time I worked with google maps, as long as you restrict you key (your app only, your domain only, etc), it wouldn't matter if it is visible