谷歌天气 api 链接需要人工认证

问题描述:

我使用 google weather API 开发了一个天气应用但从今天开始它停止工作了.

I developed a weather app using google weather API but from today it stopped working.

当我尝试通过浏览器使用位置访问天气 API 时,它要求进行人工身份验证.

When I tried to access the weather API using location through browser it asks for human authentication.

我的应用程序在这种情况下如何工作?有没有办法绕过认证过程?

How can my app work when it is like this? Is there a way to bypass the authentication process?

这是非常奇怪的行为...我想知道它是否与我尝试在 Chrome 中加载 API url 时传递的标头有关,不受支持API...或者如果我在 Firefox 中使用相同的 URL,效果很好.

It's very odd behavior...I wonder if it has something to do with headers that are passed along as when I try loading the API url in Chrome, Unsupported API...or if I do same URL in Firefox, works just fine.

还值得注意的是,我尝试通过将以下两行代码放在单独的 Web 服务器的 apache 配置中并通过 www.domain.com/weather/api?weather=Chicago 引用 API 来设置 Google 天气服务的 Apache 代理它仍然有效......所以这是我现在的解决方法:

It's also worth noting that I tried setting up an Apache Proxy to Google's weather service by placing the following two lines in a separate Web Server's apache config and referenced the API via www.domain.com/weather/api?weather=Chicago and it still works...so that's my workaround for now:

ProxyPassReverse/weather/http://www.google.com/ig/

ProxyPassReverse /weather/ http://www.google.com/ig/

ProxyPass/weather/http://www.google.com/ig/

ProxyPass /weather/ http://www.google.com/ig/