通过移动互联网连接检索时网站已更改

Site altered when retrieved via mobile internet connection

今天我发现我的站点 return 使用不同的连接有不同的响应。 通过有线互联网连接使用我的计算机,我的网站表现正常,returns 是最新的更改,但使用移动设备 phone returns 我的网站与两年前一样。

使用有线互联网连接响应headers:

Cache-Control → no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection → Keep-Alive
Content-Encoding → gzip
Content-Length → 8533
Content-Type → text/html
Date → Mon, 28 Dec 2015 09:44:57 GMT
Expires → Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive → timeout=5, max=100
Pragma → no-cache
Server → Apache/2.2.22 (Ubuntu)
Vary → Accept-Encoding
X-Powered-By → PHP/5.3.10-1ubuntu3.8

通过共享我的 phone 的互联网连接来响应 headers。与以前相同的浏览器和相同的 URL。出于某种原因,它将 return 一个旧页面,但我希望它成为 return 最新的页面。

Accept-Ranges → bytes
Age → 0
Cache-Control → no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection → keep-alive
Content-Encoding → gzip
Content-Length → 3544
Content-Type → text/html
Date → Mon, 28 Dec 2015 09:34:41 GMT
Expires → Thu, 19 Nov 1981 08:52:00 GMT
Pragma → no-cache
Server → Apache/2.2.22 (Ubuntu)
Vary → Accept-Encoding
Via → 1.1 varnish
X-Cache-Hit → MISS
X-Varnish → 1701875350

我不知道如何开始调试。想不出有什么理由会 return 根据不同的连接做出不同的响应。

更新: 问题是我的 DNS 设置。 AAAA 记录指向错误的服务器。 所以问题出现在使用我的移动 IPv6 连接时。 我保留正确答案,因为它不是一个糟糕的答案。

移动 ISP 有使用未加密连接透明地过滤您请求的内容的(坏)习惯。大多数时候,它的用意是好的(他们压缩图片以更快地保存传输 volume/be),但众所周知它会破坏东西。我不知道是否有移动 ISP 会注入自己的广告,但固定用户线路的商业模式已经存在了很长一段时间,所以这当然是可能的。

如果可以,请让您的移动 ISP 停止这样做。除此之外,除了做正确的事情之外,您无能为力:强制使用 SSL:将请求 http://yoursite/yourpath 的每个人转发到 https://yoursite/yourpath`,并配置您的 Web 服务器以通过 HTTPS 提供服务。这样,任何提供商都无法在您的服务中扮演中间人攻击。