We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e763f41 commit 8467c0aCopy full SHA for 8467c0a
1 file changed
src/app/api/gateway/proxy/route.ts
@@ -85,13 +85,14 @@ export async function POST(request: NextRequest) {
85
const subPath = request.nextUrl.searchParams.get('path') || 'chat/completions'
86
87
const authHeader = request.headers.get('authorization')
88
+ const xApiKey = request.headers.get('x-api-key')
89
const token = authHeader?.startsWith('Bearer ')
90
? authHeader.slice(7)
- : null
91
+ : xApiKey ?? null
92
93
if (!token) {
94
return NextResponse.json(
- { error: 'Missing Authorization header' },
95
+ { error: 'Missing authorization' },
96
{ status: 401 },
97
)
98
}
0 commit comments