FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge pull request #18 from zerfoo/feat/quality-targets · zerfoo/zerfoo.github.io@a0f1bc5 · GitHub

Repository navigation

Commit a0f1bc5

Browse files
authored
Merge pull request #18 from zerfoo/feat/quality-targets
Add server-side legacy hostname redirect
2 parents f8e7916 + 96b81f7 commit a0f1bc5

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

‎worker/legacy-redirect.mjs‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export default {
2+
fetch(request) {
3+
const source = new URL(request.url);
4+
const target = `https://zer.foo${source.pathname}${source.search}`;
5+
return new Response(null, {
6+
status: 301,
7+
headers: {
8+
Location: target,
9+
'Cache-Control': 'public, max-age=3600',
10+
},
11+
});
12+
},
13+
};

‎wrangler.legacy.jsonc‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "zerfoo-legacy-redirect",
3+
"main": "worker/legacy-redirect.mjs",
4+
"compatibility_date": "2026-09-10",
5+
"workers_dev": false,
6+
"routes": [{"pattern": "zerfoo.feza.ai/*", "zone_name": "feza.ai"}],
7+
"observability": {"enabled": true, "head_sampling_rate": 0.1}
8+
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL