Add hosted MCP endpoint at POST /mcp for remote agents.
Bearer-auth JSON-RPC exposes engines, generate, and job tools without duplicating the aigen API path. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -38,6 +38,7 @@ export function aigenBearerAuthorized(event: H3Event) {
|
||||
}
|
||||
|
||||
export function aigenApiPathAllowed(path: string, method: string) {
|
||||
if (path === '/mcp') return true
|
||||
if (path === '/api/aigen' || path.startsWith('/api/aigen/')) return true
|
||||
if (method === 'GET' && (path === '/api/library/stills' || path.startsWith('/api/library/stills/'))) return true
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user