fix: route agent api to account service instead of internal server

This commit is contained in:
Haitao Pan 2026-02-05 12:48:00 +08:00
parent 8030c7f474
commit d922407836

View File

@ -3,12 +3,12 @@ export const dynamic = 'force-dynamic'
import type { NextRequest } from 'next/server'
import { createUpstreamProxyHandler } from '@lib/apiProxy'
import { getInternalServerServiceBaseUrl } from '@server/serviceConfig'
import { getAccountServiceBaseUrl } from '@server/serviceConfig'
const AGENT_PREFIX = '/api/agent'
function createHandler() {
const upstreamBaseUrl = getInternalServerServiceBaseUrl()
const upstreamBaseUrl = getAccountServiceBaseUrl()
return createUpstreamProxyHandler({
upstreamBaseUrl,
upstreamPathPrefix: AGENT_PREFIX,