Skip to content

Commit c629b00

Browse files
committed
chore: prettier
1 parent cb7d88c commit c629b00

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

web/api/share.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@ import { put } from "@vercel/blob";
22
import { createHash } from "crypto";
33

44
const MAX_DATA_SIZE = 5 * 1024 * 1024; // 5MB
5-
const AllowedOrigin = process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : "http://localhost";
5+
const AllowedOrigin = process.env.VERCEL_URL
6+
? `https://${process.env.VERCEL_URL}`
7+
: "http://localhost";
68
const productionOrigin = "https://overlay.speakeasy.com";
79

810
export function POST(request: Request) {
911
const origin = request.headers.get("Origin");
1012

11-
if (!origin || (!origin.startsWith(AllowedOrigin) && !origin.startsWith(productionOrigin))) {
13+
if (
14+
!origin ||
15+
(!origin.startsWith(AllowedOrigin) && !origin.startsWith(productionOrigin))
16+
) {
1217
return new Response("Unauthorized", { status: 403 });
1318
}
1419

0 commit comments

Comments
 (0)