fix(web): send old-domain redirects to https only

The deepseek-tui.com redirect worker kept the request's scheme when it
swapped the host, so a plain-http request to the old domain was
redirected to http://codewhale.net/... instead of https. The worker now
sets the scheme to https before it sets the host, so every redirect from
the old domain lands on https://codewhale.net with the same path and
query.

Evidence (source and local only; the worker is not deployed by this
change):
- A scratch harness outside the repository imports
  web/redirect/src/index.ts and calls fetch() for two http inputs and
  one https input. Before: 2 of 3 Location headers were http (exit 1).
  After: 3 of 3 are https (exit 0).
- eslint redirect/src/index.ts: exit 0, no findings.
- tsc --noEmit --strict on redirect/src/index.ts: exit 0.
- No existing test covers this worker and none was added.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
CodeWhale BotandClaude Opus 5.5 committed 2026-10-20 15:34:15 -07:00
1 parent de36104a55
commit 67f968661f
1 file changed
+1
+1
View File
@@ -1,6 +1,7 @@
const redirectWorker = {
fetch(request: Request): Response {
const url = new URL(request.url);
url.protocol = "https:";
url.host = "codewhale.net";
return Response.redirect(url.toString(), 301);
},