3

Does anyone have a good solution for managing the maps api key, given that:

  • developers work locally, using localhost

  • we have a staging server, accessed internally via http://stagehost and externally (for customers) via IP address

  • finally, a production server (http://some.domain.com)

Two questions:

First, how do people manage their keys in this type of scenario, given that there's always a chance for a mixup. Internal servers are not accessible via stagehost.domain.com

Second, how can we address the staging server issue? The ip address is not accessible internally. Is this possible?

4

1 回答 1

1

我的数据库中有一个表,用于存储我所有不同 URL 的 Google Map 键。然后我只是根据 URL 取出正确的密钥。这让相同的代码可以跨 100 个站点用于开发、测试和生产。

于 2010-01-12T17:09:18.873 回答