Skip to content

Commit

Permalink
fix: upload origin can be from anywhere (#1178)
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity authored Jul 23, 2024
1 parent 4d65b9c commit 5ed1df6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/ui/docs-bundle/src/pages/api/fern-docs/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@ export default async function GET(req: NextRequest): Promise<NextResponse> {
return new NextResponse(null, { status: 405 });
}

const origin = req.headers.get("Origin");
if (origin == null) {
return new NextResponse(null, { status: 400 });
}

const corsHeaders = new Headers({
"Access-Control-Allow-Origin": origin,
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET",
"Access-Control-Allow-Headers": "Content-Type",
});
Expand Down

0 comments on commit 5ed1df6

Please sign in to comment.