Skip to content

Commit 62019fe

Browse files
committed
Check the users archive at its directory URL
Workers static assets redirect /users-archive/index.html to the directory URL with a 307. Also document that a Custom Domain cannot be attached while another DNS record exists for the hostname.
1 parent f28a507 commit 62019fe

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

‎docs/operations.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ environment accepts only `main` and holds two secrets:
9999
Settings Read on the Gecode account, and Zone Read and Workers Routes Write
100100
on `gecode.dev`. It cannot change DNS, SSL or rules.
101101

102+
The Custom Domain owns the `www` DNS record, so it does not appear as an
103+
ordinary record in the DNS list. Cloudflare refuses to attach a Custom Domain
104+
while another record exists for the hostname, and Wrangler does not replace it
105+
in CI. If the domain is ever detached and must be reattached, delete any `www`
106+
record and add the domain under Workers & Pages, `gecode-website`, Domains in
107+
the same minute: resolvers may cache the missing name for 30 minutes.
108+
102109
The same build can be deployed by hand from the Workers workflow
103110
(`worker=website`) to `www-staging.gecode.dev` or, with the
104111
`cloudflare-production` approval, to production.

‎scripts/check-availability.mjs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ await check(`/news/?availability=${Date.now()}`, 200, async (response) => {
7878
await check("/download.html?availability=1", 308, (response) => {
7979
assert.equal(response.headers.get("location"), `${origin}/download/?availability=1`);
8080
});
81-
await check("/users-archive/index.html", 200, async (response) => {
81+
await check("/users-archive/index.html", 307, (response) => {
82+
assert.equal(response.headers.get("location"), "/users-archive/");
83+
});
84+
await check("/users-archive/", 200, async (response) => {
8285
assert.match(response.headers.get("content-type"), /text\/html/);
8386
assert.match((await bytes(response)).toString(), /Gecode users archive/);
8487
});

0 commit comments

Comments
 (0)