I am new to javascripts. I am using Google Maps JavaScript API to include the Autocomplete functionality in my site. The code demands an API key to perform.
<script src="https://maps.googleapis.com/maps/api/js?key=MY_API_KEY&libraries=places"></script>
I want to protect this API key as this is publicly available and anyone canview my javascript code using view page source
on the browser.
How can I protect this API key so that it can not be seen publicly??