New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow GOOGLE_API_KEY to be set #7276

Merged
merged 5 commits into from Sep 21, 2016

Conversation

Projects
None yet
4 participants
@zeke
Member

zeke commented Sep 20, 2016

Another go at #7197 that fixes #6648. The geolocation code got a little hairy after the chrome 53 upgrade, so I started over.

This change allows a GOOGLE_API_KEY environment variable to be set (before or during runtime) that will override the default key used for making geolocation requests.

We decided to punt on adding an environment variable to customize the host URL (e.g. https://www.googleapis.com/geolocation/v1/geolocate?key=). If someone wants that behavior, we could later introduce another environment variable for that, or perhaps a new API for setting the geolocation request URL.

馃崘 @kevinsawicki

zeke and others added some commits Sep 20, 2016

file, before opening any browser windows that will make geocoding requests:
```javascript
process.env.GOOGLE_API_KEY='YOUR_KEY_HERE'

This comment has been minimized.

@kevinsawicki

kevinsawicki Sep 20, 2016

Contributor

Spaces needed around the =

This comment has been minimized.

@zeke

zeke Sep 20, 2016

Member

fixed. thanks.

@zcbenz

This comment has been minimized.

Contributor

zcbenz commented Sep 21, 2016

馃憤

@zcbenz zcbenz merged commit 805ce0d into master Sep 21, 2016

7 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
electron-linux-arm Build #4184946 succeeded in 58s
Details
electron-linux-ia32 Build #4184947 succeeded in 52s
Details
electron-linux-x64 Build #4184948 succeeded in 105s
Details
electron-win-ia32 Build #1502 succeeded in 7 min 47 sec
Details
electron-win-x64 Build #1480 succeeded in 7 min 57 sec
Details

@zcbenz zcbenz deleted the google-api-key-env2 branch Sep 21, 2016

@Vikaton

This comment has been minimized.

Vikaton commented May 11, 2017

Any help with this issue? @zeke #9420

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment