Claude Code Claude Opus 4.6 commited on
Commit
19af8c5
·
1 Parent(s): d04785a

Claude Code: Fix /api/trigger routing through a2a-proxy

Browse files

The /api/trigger endpoint was falling into the catch-all proxy to
OpenClaw, which doesn't know about this route. Add explicit routing
to proxy /api/trigger to the FastAPI backend (A2A_PORT).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. scripts/a2a-proxy.cjs +5 -0
scripts/a2a-proxy.cjs CHANGED
@@ -275,6 +275,11 @@ const server = http.createServer((req, res) => {
275
  return proxyRequest(req, res, A2A_PORT);
276
  }
277
 
 
 
 
 
 
278
  // State endpoint for Office frontend polling
279
  if (pathname === '/api/state' || pathname === '/status') {
280
  res.writeHead(200, {
 
275
  return proxyRequest(req, res, A2A_PORT);
276
  }
277
 
278
+ // API trigger endpoint → FastAPI backend (resolves A2A deadlock)
279
+ if (pathname === '/api/trigger') {
280
+ return proxyRequest(req, res, A2A_PORT);
281
+ }
282
+
283
  // State endpoint for Office frontend polling
284
  if (pathname === '/api/state' || pathname === '/status') {
285
  res.writeHead(200, {