mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-04-25 11:18:22 +00:00
fix(frontend): add skills API rewrite rule to prevent HTML fallback (#2241)
Fixes #2203 When NEXT_PUBLIC_BACKEND_BASE_URL is not set, the frontend uses Next.js rewrites to proxy API calls to the gateway. Skills API routes were missing from the rewrite config, causing /api/skills to return the SPA HTML instead of JSON, which produced 'Unexpected token <' errors in the skill settings page. Co-authored-by: JasonOA888 <JasonOA888@users.noreply.github.com>
This commit is contained in:
parent
35fb3dd65a
commit
772538ddba
@ -52,6 +52,14 @@ const config = {
|
||||
source: "/api/agents/:path*",
|
||||
destination: `${gatewayURL}/api/agents/:path*`,
|
||||
});
|
||||
rewrites.push({
|
||||
source: "/api/skills",
|
||||
destination: `${gatewayURL}/api/skills`,
|
||||
});
|
||||
rewrites.push({
|
||||
source: "/api/skills/:path*",
|
||||
destination: `${gatewayURL}/api/skills/:path*`,
|
||||
});
|
||||
}
|
||||
|
||||
return rewrites;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user