2

I created an API key for gmapsv3 but it's asking me for allowing some HTTP referrers.

What is the referrer for a cordova app, since there is no URL?

I left * for the moment but how to secure my key?

I'm under meteor and tries meteor.local, but it doesn't seem to work.

Thanks

Louis XIV
  • 2,224
  • 13
  • 16

1 Answers1

0

You could potentially change the native code to add a referer, and lock your maps key down to that... there is an example of such here.

Alternatively if you want a platform independent solution you could add implement a proxy on your server, keep your Google Maps key there on the server and have it make requests to Google Maps on your behalf. This would introduce another layer of network calls, then you'd also want to secure your proxy so that you can be pretty sure that the requests are coming from your app - maybe by setting a custom HTTP header that your server can look for.

Community
  • 1
  • 1
Simon Prickett
  • 3,838
  • 1
  • 13
  • 26