在 google 开发人员控制台的 "Accept requests from these HTTP referrers" 字段中设置 HTTP 引荐来源网址的正确方法
Correct way to set HTTP referrers in "Accept requests from these HTTP referrers" field in google developer console
我需要在 google 开发者控制台中保护我付费的 google 地图 API 密钥。
我曾在 'Credentials' 选项卡的 api 键设置中尝试过此操作。
字段标签 'Accept requests from these HTTP referrers ...'.
如果我是对的,这个*.dev2.urelay.xyz/*
一定对这个有用URL - https://dev2.urelay.xyz/
但这对我不起作用,我的控制台出现了这个错误
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: https://dev2.urelay.xyz/
*.dev2.urelay.xyz/*
与 https://dev2.urelay.xyz/
不匹配,因为它需要一个不在 URL.
中的句点 (.
)
dev2.urelay.xyz/*
会匹配它。如果您有一个需要托管地图的 dev2 子域(例如 https://www.dev2.urelay.xyz/
)
,您只需要 *.dev2.urelay.xyz/*
形式
我需要在 google 开发者控制台中保护我付费的 google 地图 API 密钥。 我曾在 'Credentials' 选项卡的 api 键设置中尝试过此操作。 字段标签 'Accept requests from these HTTP referrers ...'.
如果我是对的,这个*.dev2.urelay.xyz/*
一定对这个有用URL - https://dev2.urelay.xyz/
但这对我不起作用,我的控制台出现了这个错误
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: https://dev2.urelay.xyz/
*.dev2.urelay.xyz/*
与 https://dev2.urelay.xyz/
不匹配,因为它需要一个不在 URL.
.
)
dev2.urelay.xyz/*
会匹配它。如果您有一个需要托管地图的 dev2 子域(例如 https://www.dev2.urelay.xyz/
)
*.dev2.urelay.xyz/*
形式