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>
This commit is contained in:
12
deps/db-sync/worker/mcp_request.mjs
vendored
Normal file
12
deps/db-sync/worker/mcp_request.mjs
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
export function ensureMcpAcceptHeader(request) {
|
||||
const accept = request.headers.get("accept") ?? "";
|
||||
const normalizedAccept = accept.toLowerCase();
|
||||
if (normalizedAccept.includes("application/json") &&
|
||||
normalizedAccept.includes("text/event-stream")) {
|
||||
return request;
|
||||
}
|
||||
|
||||
const headers = new Headers(request.headers);
|
||||
headers.set("accept", "application/json, text/event-stream");
|
||||
return new Request(request, { headers });
|
||||
}
|
||||
Reference in New Issue
Block a user