feat: forward Authorization header from request to downstream
Prioritize Authorization header from incoming request over environment variable, allowing per-request API key routing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@ const ollamaRoutes: FastifyPluginAsync = async (server: FastifyInstance) => {
|
||||
return;
|
||||
}
|
||||
|
||||
const response = await forwardChatRequest(body);
|
||||
const response = await forwardChatRequest(body, request.headers.authorization);
|
||||
|
||||
reply.status(200).send(response);
|
||||
} catch (error: any) {
|
||||
|
||||
Reference in New Issue
Block a user