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>
17 lines
522 B
JavaScript
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",
|
|
},
|
|
});
|
|
}
|