Construction mode hides pages from Markdown, MCP and search; MCP rejects non-object messages
createContentHelpers exposes isPathVisible (built from getConstructionMode) and passes it to markdownRoute and mcpPOST; createSearchRoute, createMcpRoute and createMarkdownRoute accept it. A null/number/string JSON-RPC message now gets -32600 instead of crashing the route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9a72ebfaff
commit
7c05a1dba9
@@ -110,7 +110,7 @@ export async function submitForm({
|
||||
// 1. Rate limit — cheapest gate, drops a flood before any real work.
|
||||
// No IP → the limiter's shared "unknown" bucket, never a free pass.
|
||||
if (maxPerMinute > 0) {
|
||||
if (!(await consumeRateLimit({ key: ip, max: maxPerMinute })).ok) {
|
||||
if (!(await consumeRateLimit({ key: ip ?? '', max: maxPerMinute })).ok) {
|
||||
return { reason: 'rate_limited', success: false }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user