Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/64.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google maps 在防火墙后使用谷歌地图api_Google Maps_Firewall - Fatal编程技术网

Google maps 在防火墙后使用谷歌地图api

Google maps 在防火墙后使用谷歌地图api,google-maps,firewall,Google Maps,Firewall,我有一个嵌入谷歌地图的应用程序。很好。一些用户在防火墙后面,对世界其他地区的访问非常受限 有人知道谷歌地图api使用的dns名称/ip地址的有效列表吗?我可以在firebug的网络面板中看到它加载的dns名称。但是仅仅使用它们感觉有点不安全。是否有这样一个列表,我可以添加到防火墙白名单 …弗雷德里克 编辑 我和一个在谷歌地图团队工作的人谈过。他还说,这是不可能的,因为ip地址会发生变化,因为地图服务在整个范围内通过服务器进行拆分。正如我在Chrome的控制台中看到的,谷歌地图目前正在使用3台服务

我有一个嵌入谷歌地图的应用程序。很好。一些用户在防火墙后面,对世界其他地区的访问非常受限

有人知道谷歌地图api使用的dns名称/ip地址的有效列表吗?我可以在firebug的网络面板中看到它加载的dns名称。但是仅仅使用它们感觉有点不安全。是否有这样一个列表,我可以添加到防火墙白名单

…弗雷德里克

编辑


我和一个在谷歌地图团队工作的人谈过。他还说,这是不可能的,因为ip地址会发生变化,因为地图服务在整个范围内通过服务器进行拆分。

正如我在Chrome的控制台中看到的,谷歌地图目前正在使用3台服务器:

  • mt0.google.com(ew-in-f100.1e100.net)
  • mt1.google.com(ew-in-f102.1e100.net)
  • maps.gstatic.com(ew-in-f104.1e100.net)
正如您所看到的,它们都在
1e100.net
域中


1e100
等于
1 googol
;)

现在这是可能的。信息的主要来源如下:

配置防火墙以允许访问谷歌地图API服务

重要原因:地图API服务使用多种域,有些域不属于*google.com域。如果您处于限制性防火墙之后,了解哪些映射API服务使用哪些域是很重要的

如果不允许访问正确的域,则会导致API请求失败,从而导致应用程序中断。有关Maps API使用的域的完整列表,请咨询我们的(需要登录):

登录到 支持门户仅对工作用户的Google Maps API可用。 导航到“资源”选项卡 选择调用的资源 您应该允许应用程序访问这些域


请注意,我们不建议按IP地址管理防火墙限制,因为与这些域关联的IP不是静态的。

以下是关于Google Maps API中使用的域的文章内容。本文可从Google云支持门户网站获得:

本文档列出了加载地图组件时Google地图平台使用的所有域。提供此域列表是为了帮助您设置防火墙配置,以防您的Internet访问被每个域策略过滤

重要注意事项

  • 此列表可能会随着新功能的推出而更改,并且可能不会随着新域的出现而更新。建议每2个月检查一次此页面
  • 下面包含google.com的条目可以替换为google Maps发布的其他域:Maps.google.co.uk、ditu.google.com、bendi.google.com、ditu.google.cn、bendi.google.cn、mapy.google.pl等
  • 从中国访问API的用户将分别向google.com和gstatic.com之外的google.cn和gstatic.cn下的域发送请求
Javascript通过HTTP映射API(V2和V3)

地图Javascript API V3(和V2)引导和服务(地理编码、行驶方向、海拔、kml)使用:

  • maps.google.com
  • maps.googleapis.com
静态依赖项:

  • maps.gstatic.com
地图分幅和交通分幅:

  • maps.googleapis.com
架空瓷砖:

  • khmdb0.google.com
  • khmdb0.googleapis.com
  • khmdb1.google.com
  • khmdb1.googleapis.com
卫星地砖:

  • khm.google.com
  • khm.googleapis.com
  • khm0.google.com
  • khm0.googleapis.com
  • khm1.google.com
  • khm1.googleapis.com
  • khms0.google.com
  • khms0.googleapis.com
  • khms1.google.com
  • khms1.googleapis.com
街景图像:

  • geo0.ggpht.com
  • geo1.ggpht.com
  • geo2.ggpht.com
  • geo3.ggpht.com
  • lh3.ggpht.com
  • lh4.ggpht.com
  • lh5.ggpht.com
  • lh6.ggpht.com
  • cbk0.google.com
  • cbk0.googleapis.com
  • cbk1.google.com
  • cbk1.googleapis.com
  • cbk2.google.com
  • cbk2.googleapis.com
  • cbk3.google.com
  • cbk3.googleapis.com
  • lh3.googleusercontent.com
  • lh4.googleusercontent.com
  • lh5.googleusercontent.com
  • lh6.googleusercontent.com
报告请求:

  • gg.google.com
身份查验请求:

  • id.google.com
Javascript通过HTTPS映射API(V2和V3)

地图Javascript API V3(和V2)引导和服务(地理编码、行驶方向、海拔、kml)使用:

  • maps-api-ssl.google.com
  • maps.googleapis.com
静态依赖项:

  • maps-api-ssl.google.com
  • maps.gstatic.com
地图分幅和交通分幅:

  • maps.googleapis.com
架空瓷砖:

  • khmdb0.google.com
  • khmdb0.googleapis.com
  • khmdb1.google.com
  • khmdb1.googleapis.com
卫星地砖:

  • khm.google.com
  • khm.googleapis.com
  • khm0.google.com
  • khm0.googleapis.com
  • khm1.google.com
  • khm1.googleapis.com
  • khms0.google.com
  • khms0.googleapis.com
  • khms1.google.com
  • khms1.googleapis.com
  • khms2.google.com
  • khms2.googleapis.com
  • khms3.google.com
  • khms3.googleapis.com
街景图像