Fix: POST files/retain uses authentication headers (#636)

Co-authored-by: soberreu <soberreu>
This commit is contained in:
Simon Oberreuter 2026-03-21 20:24:12 +01:00 committed by GitHub
parent 3f31cbf505
commit 78aa7c537e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
import { NextRequest, NextResponse } from "next/server";
import { DATAPLANE_URL } from "@/lib/hindsight-client";
import { DATAPLANE_URL, getDataplaneHeaders } from "@/lib/hindsight-client";
export async function POST(request: NextRequest) {
try {
@ -25,6 +25,7 @@ export async function POST(request: NextRequest) {
// Forward the form data to the dataplane
const response = await fetch(url, {
method: "POST",
headers: getDataplaneHeaders(),
body: formData,
// Don't set Content-Type - let fetch handle multipart boundary
});