fix(cypher): KBDB proxy 指向現役 arcrun-kbdb(舊 fallback kbdb.finally.click 已死)
煙霧測試發現 proxy fallback 寫死舊的 kbdb.finally.click(inkstone 遺留、 回 Missing token),非現役 KBDB。改: - kbdb-proxy.ts fallback → arcrun-kbdb.uncle6-me.workers.dev(現役、無 auth) - cypher wrangler.toml [vars] KBDB_BASE_URL 明設現役 URL(self-host fork 覆蓋自己的) 現役 arcrun-kbdb 無 auth middleware,不需 KBDB_INTERNAL_TOKEN。 cli 版本檔 1.3.8→1.3.9(deploy 腳本自動 bump,含 acr kbdb 命令)。 cypher tsc exit 0。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,9 +23,14 @@ import type { Bindings } from '../types';
|
||||
|
||||
export const kbdbProxyRouter = new Hono<{ Bindings: Bindings }>();
|
||||
|
||||
/** KBDB 基本盤 base URL + internal headers(沿用 webhook-handlers.ts 慣例)。 */
|
||||
/**
|
||||
* KBDB 基本盤 base URL + internal headers。
|
||||
* fallback 指**現役** arcrun-kbdb(workers.dev,無 auth、不需 token)——
|
||||
* 不沿用 webhook-handlers.ts 的舊 fallback kbdb.finally.click(inkstone 遺留、已死、要 token)。
|
||||
* KBDB_BASE_URL 可覆蓋(self-hosted fork 指自己的 KBDB)。
|
||||
*/
|
||||
function kbdbBase(env: Bindings): { base: string; headers: Record<string, string> } {
|
||||
const base = (env.KBDB_BASE_URL ?? 'https://kbdb.finally.click').replace(/\/$/, '');
|
||||
const base = (env.KBDB_BASE_URL ?? 'https://arcrun-kbdb.uncle6-me.workers.dev').replace(/\/$/, '');
|
||||
const headers: Record<string, string> = { 'Content-Type': 'application/json' };
|
||||
if (env.KBDB_INTERNAL_TOKEN) headers['Authorization'] = `Bearer ${env.KBDB_INTERNAL_TOKEN}`;
|
||||
return { base, headers };
|
||||
|
||||
Reference in New Issue
Block a user