From f544a6052a12fae0cff1469e9d3112fd62beac65 Mon Sep 17 00:00:00 2001 From: Dmitry Prudnikov Date: Sun, 12 Apr 2026 18:29:37 +0300 Subject: [PATCH] docs: wire consent storage and bug reports for docs.coordinode.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use coordinode-docs.sw.foundation as API proxy — coordinode.com DNS is on PowerDNS (not Cloudflare), so direct CF Worker zone routing is impossible. sw.foundation subdomain acts as proxy (same pattern as gitlab-mcp and privacy sites). - theme/index.ts: createKVStorage absolute URL pointing to coordinode-docs.sw.foundation/api/consent - BugReportWidget.vue: fetch absolute URL pointing to coordinode-docs.sw.foundation/api/report-bug Closes #7 --- docs/.vitepress/theme/components/BugReportWidget.vue | 4 +++- docs/.vitepress/theme/index.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/.vitepress/theme/components/BugReportWidget.vue b/docs/.vitepress/theme/components/BugReportWidget.vue index b524ca6..6911b02 100644 --- a/docs/.vitepress/theme/components/BugReportWidget.vue +++ b/docs/.vitepress/theme/components/BugReportWidget.vue @@ -54,7 +54,9 @@ async function submit() { errorMessage.value = ""; try { - const response = await fetch("/api/report-bug", { + // Absolute URL: coordinode.com DNS is on PowerDNS (not Cloudflare), so the + // bug-reports worker is proxied through coordinode-docs.sw.foundation (CF zone). + const response = await fetch("https://coordinode-docs.sw.foundation/api/report-bug", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index 9c70f8f..d4d0579 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -14,7 +14,9 @@ const GA_ID = (import.meta.env as Record).VITE_GA_ID || ""; const consentTheme = enhanceWithConsent(DefaultTheme, { gaId: GA_ID, // KV storage via Cloudflare Worker (configured in R-DOC2 — bug-reports-worker) - storage: createKVStorage("/api/consent"), + // Absolute URL: coordinode.com DNS is on PowerDNS (not Cloudflare), so the + // consent worker is proxied through coordinode-docs.sw.foundation (CF zone). + storage: createKVStorage("https://coordinode-docs.sw.foundation/api/consent"), }); export default {