I have a very strange situation where a stale version of my app is being served only when accessing it through its CNAME alias.
(我遇到一个非常奇怪的情况,仅当通过其CNAME别名访问它的应用程序时,才提供过时的版本。)
The app is a static node app built with Webpack and hosted on Zeit NOW.
(该应用程序是使用Webpack构建的静态节点应用程序,并托管在Zeit NOW上。)
If I access it using the direct Zeit URL, I get the most recent version and correct JS assets: (如果我使用直接Zeit URL访问它,则会得到最新版本并更正JS资产:)
https://nates-app.now.sh/index.html -> https://nates-app.now.sh/client/index.eb53e753.js (current)
In AWS Route53, I have a CNAME set up to alias www.nates-app.com
to https://nates-app.now.sh
.
(在AWS Route53中,我将CNAME设置为别名www.nates-app.com
到https://nates-app.now.sh
。)
However, pointing my browser to https://www.nates-app.com
results in a stale index.html
. (但是,将我的浏览器指向https://www.nates-app.com
导致过时的index.html
。)
What's even stranger, is that the stale index.html page reqeusts stale JS and CSS assets, which also are being returned successfully: (更奇怪的是,过时的index.html页面需要过时的JS和CSS资产,这些资产也已成功返回:)
https://www.nates-app.com/index.html -> https://www.nates-app.com/client/index.f64812dd.js (stale)
The stale version is more than 48 hours old.
(过时的版本已超过48小时。)
Dig shows nearly identical results.
(Dig显示几乎相同的结果。)
dig nates-app.now.sh
results in the following ANSWER section: (dig nates-app.now.sh
结果显示在以下ANSWER部分中:)
;; ANSWER SECTION:
nates-app.now.sh. 60 IN A 1.2.3.4
nates-app.now.sh. 60 IN A 4.3.2.1
dig www.nates-app.com
results in identical output, with only the one (expected) addition showing the CNAME in the ANSWER
section:
(dig www.nates-app.com
输出相同,只有一个(预期的)加法在ANSWER
部分显示CNAME:)
;; ANSWER SECTION:
www.nates-app.com. 300 IN CNAME https://nates-app.now.sh.
nates-app.now.sh. 60 IN A 1.2.3.4
nates-app.now.sh. 60 IN A 4.3.2.1
I'm not using AWS Cloudfront, or any other CDN for static assets.
(我没有将AWS Cloudfront或任何其他CDN用于静态资产。)
I've obviously cleared my browser's cache, and even toggled my VPN off and on.
(我显然已经清除了浏览器的缓存,甚至关闭了我的VPN的电源。)
A colleague sees the same thing when accessing the internet from a different ISP. (同事从其他ISP访问Internet时也会看到相同的事情。)
So what in the world wide web could be caching a (very) old version of my site's HTML and accompanying assets?
(那么,在互联网上什么可以缓存(非常旧版本的)网站的HTML和相关资源?)
ask by Nate Vaughan translate from so