Problem
Several Next.js API proxy routes in components/frontend/src/app/api/ send Content-Type: application/json on outbound fetch() calls that use GET with no request body. Content-Type describes the format of a request body; it is semantically incorrect (and misleading) on a bodyless GET. The correct header to signal that the caller expects a JSON response is Accept: application/json.
This was surfaced during review of PR #998 (comment: #998 (comment)). The fix was intentionally deferred from that PR to keep all proxy routes consistent in a single follow-up.
Notably, components/frontend/src/app/api/projects/[name]/agentic-sessions/[sessionName]/agui/events/route.ts already explicitly deletes Content-Type for its GET SSE request, confirming awareness of the issue.
Affected routes (outbound GET fetch with wrong header)
components/frontend/src/app/api/version/route.ts
components/frontend/src/app/api/cluster-info/route.ts
components/frontend/src/app/api/projects/[name]/settings/route.ts (GET handler)
components/frontend/src/app/api/workflows/ootb/route.ts (GET handler)
components/frontend/src/app/api/projects/[name]/agentic-sessions/[sessionName]/mcp/status/route.ts
(And any other GET handlers that set Content-Type without a body — a full audit of the components/frontend/src/app/api/ directory is recommended.)
Proposed fix
For each bodyless outbound GET fetch, replace:
headers: {
'Content-Type': 'application/json',
}
with:
headers: {
'Accept': 'application/json',
}
Requests that include a body (POST/PUT/PATCH) correctly keep Content-Type: application/json and are out of scope.
References
Problem
Several Next.js API proxy routes in
components/frontend/src/app/api/sendContent-Type: application/jsonon outboundfetch()calls that useGETwith no request body.Content-Typedescribes the format of a request body; it is semantically incorrect (and misleading) on a bodylessGET. The correct header to signal that the caller expects a JSON response isAccept: application/json.This was surfaced during review of PR #998 (comment: #998 (comment)). The fix was intentionally deferred from that PR to keep all proxy routes consistent in a single follow-up.
Notably,
components/frontend/src/app/api/projects/[name]/agentic-sessions/[sessionName]/agui/events/route.tsalready explicitlydeletesContent-Typefor its GET SSE request, confirming awareness of the issue.Affected routes (outbound GET fetch with wrong header)
components/frontend/src/app/api/version/route.tscomponents/frontend/src/app/api/cluster-info/route.tscomponents/frontend/src/app/api/projects/[name]/settings/route.ts(GET handler)components/frontend/src/app/api/workflows/ootb/route.ts(GET handler)components/frontend/src/app/api/projects/[name]/agentic-sessions/[sessionName]/mcp/status/route.ts(And any other GET handlers that set
Content-Typewithout a body — a full audit of thecomponents/frontend/src/app/api/directory is recommended.)Proposed fix
For each bodyless outbound
GETfetch, replace:with:
Requests that include a body (POST/PUT/PATCH) correctly keep
Content-Type: application/jsonand are out of scope.References