Files
Synapse/deps/db-sync/worker/openai_app_challenge.mjs
Dasemu 40631362b3 Initial import of LogDarioSeq baseline
Establishes version control for the personal Logseq DB fork before
starting the server-client architecture migration and domain features
described in docs/agent-guide and the approved implementation plan.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 15:32:15 +02:00

17 lines
522 B
JavaScript

const OPENAI_APPS_CHALLENGE_PATH = "/.well-known/openai-apps-challenge";
export function openAiAppsChallengeResponse(request, env) {
const url = new URL(request.url);
if (request.method !== "GET" || url.pathname !== OPENAI_APPS_CHALLENGE_PATH) return null;
const token = env.OPENAI_APPS_CHALLENGE;
if (!token) throw new Error("OPENAI_APPS_CHALLENGE is required");
return new Response(token, {
headers: {
"cache-control": "no-store",
"content-type": "text/plain; charset=utf-8",
},
});
}