Google Maps API RefererNotAllowedError [英] Google Maps API RefererNotAllowedError
问题描述
我已经创建了一个用于Google Maps JavaScript API的Google密钥。
每件事情都可以使用,直到我添加到
接受来自这些HTTP引用者的请求
我以这种格式添加了引荐来源: 然后API停止工作,并在js控制台中抛出此错误: 脚本标记: 所以它似乎告诉我我需要指定确切的网址在引用者列表中。 但我认为使用 是否真的有必要指定您的网站上使用Map API的每个位置? 您需要授权 I have created an Google key for use with the Google Maps JavaScript API. Every thing works until I add to the credential under
Accept requests from these HTTP referrers I added the referrer in this format: Then the API stops working and throws this error in the js console: The call in the scripts tag on the site: So it seems to be telling me I need to specify the exact url in the referer list. But I thought the purpose of using the Is it really necessary to specify every single location on your website that will use the Map API ? You need to authorize 这篇关于Google Maps API RefererNotAllowedError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! *。example.com/*$c $ c>通过Credentials页面上的占位符。
Google Maps API错误:RefererNotAllowedMapError
https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error
您的网站网址将被授权:http://example.com/test/
http://maps.googleapis.com/maps/api/js?key=** *********
*
通配符的目的是让整个网站允许使用。
示例.com / test /
(它会匹配 www.example.com
)。
example.com / *
*.example.com/*
Per the placeholder on the Credentials page. Google Maps API error: RefererNotAllowedMapError
https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error
Your site URL to be authorized: http://example.com/test/
http://maps.googleapis.com/maps/api/js?key=***********
*
wildcard was so the whole site would allow usage. *.example.com/*
(all sub-domains of example.com) doesn't match example.com/test/
(it would match www.example.com
though).example.com/*