1

让我们选择早期版本的 Google Maps API:您必须将 API 密钥添加到 JavaScript Maps API 的后缀,该密钥可以与查看源代码一起复制并供其他人使用。

这里的诀窍在哪里?我错过了什么?

我不受谷歌地图本身的影响。

4

2 回答 2

4

该 API 密钥特定​​于某个 URL,并且只能在该 URL 中使用。

于 2012-06-29T19:25:16.160 回答
1

You should check old answers before creating new ones! :) This subject has been asked several times like in here: How does Google Maps secure their API Key? How to make something similar? .

The answer is: In order for request to be allowed the registered url for that API key should match with the HTTP referer header of the incoming request.

于 2012-06-30T22:08:51.890 回答