如何设置Google API密钥限制 - HTTP引用 [英] How to set Google API key restriction - HTTP referrers

查看:494
本文介绍了如何设置Google API密钥限制 - HTTP引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google API密钥限制 - HTTP引用者

Google API key restriction - HTTP referrers

我将Azure网站网址xxxx.scm.azurewebsites.net放在那里但不起作用(Google Places API Web Service停止工作)。

I put my Azure website url xxxx.scm.azurewebsites.net there but doesn't work (Google Places API Web Service stops working).

localhost:44300也不起作用。

localhost:44300 doesn't work either.

我必须设定关键限制为'None',那么Google Places API Web Service将会正常工作。

I have to set key restriction to 'None', then Google Places API Web Service will work.

我做错了什么?

What did I do wrong?

推荐答案

Web服务应该在后端服务器上执行,因此对Web服务的正确限制是IP限制。

Web Service is supposed to be executed on backend servers, so the correct restriction for web services is IP restriction.

HTTP referer限制是用于Google Maps JavaScript API等客户端服务,它不适用于Web服务。

HTTP referer restriction is used for client side services like Google Maps JavaScript API, it won't work with web services.

这篇关于如何设置Google API密钥限制 - HTTP引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆