Does google maps javascript api-key (v3) need to be kept secret in HTML checked into github and if so, how?

后端 未结 5 2262
一向
一向 2020-12-16 10:05

Looking at the developers guide for the Google Maps Javascript API v3 it explains first about how to obtain an API, then shows examples of including that key in the HEAD sec

5条回答
  •  庸人自扰
    2020-12-16 10:30

    What Frazell says is correct, when you receive your api key on the right is a 'Edit allowed referers...' link that pops up an option to allow the websites you want to show your map on, if you leave this blank you are allowing any, but if you set let's say http://yourdomain.com only that domain can display the map.

提交回复
热议问题