开发者

Google maps api keys: dev -> staging -> production workflow

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 server开发者_如何学Gos 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?


I have a table in my database that stores the Google Map keys for all of my different URLs. Then I just pull out the correct key based on the URL. This lets the same code work for dev, test, & production across 100 sites.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜