Fix: POST files/retain uses authentication headers (#636)
Co-authored-by: soberreu <soberreu>
This commit is contained in:
parent
3f31cbf505
commit
78aa7c537e
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue