feat: forward X-API-Key header from Next.js proxy routes to ML service
All 12 Next.js API routes that proxy requests to the ML service (INFERENCE_API_URL / localhost:8001) now include the X-API-Key header read from process.env.API_KEY. Affected routes: - /api/predict - /api/predict/batch - /api/model/info - /api/model/load - /api/training/start - /api/training/runs - /api/training/runs/[run_id] (DELETE) - /api/training/dataset-info - /api/training/active - /api/training/build-dataset - /api/patterns/available - /api/patterns/detect Marks task 3.3 as complete in openspec/changes/code-review-fix/tasks.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5f569d9134
commit
4a3e4a48ba
13 changed files with 13 additions and 9 deletions
|
|
@ -16,6 +16,7 @@ export async function POST(request: NextRequest) {
|
|||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-API-Key': process.env.API_KEY || '',
|
||||
},
|
||||
body: JSON.stringify(body),
|
||||
signal: controller.signal,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue