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

后端 未结 5 2266
一向
一向 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:32

    You should keep your API key private and not share it publicly, via GitHub or any other means. You can place it in a configuration file that loads the value in later and keep that file outside of GitHub, for instance.

提交回复
热议问题