fix(02-03): set-webhook auto-appends /telegram/webhook to a pathless URL

- Deploy walkthrough revealed a bare workers.dev origin setWebhook answers ok but drops updates at / (404)
- Normalize WEBHOOK_URL: no path -> append /telegram/webhook; invalid URL -> fail fast, never echo values (T-02-04)
- .dev.vars.example documents the path expectation
This commit is contained in:
araharah-executor
2026-10-22 19:56:24 +08:00
parent 2ea7f6edc7
commit d600d6e71a
2 changed files with 25 additions and 1 deletions
+1
View File
@@ -1,4 +1,5 @@
# Copy to .dev.vars and fill for local wrangler dev (D-15). NEVER commit .dev.vars.
BOT_TOKEN=
WEBHOOK_SECRET=
# Full origin + path; set-webhook.mjs auto-appends /telegram/webhook if only an origin is set.
WEBHOOK_URL=