Skip to content

Commit 72c8d82

Browse files
committed
fix(sending): properly set origin header
1 parent 109c570 commit 72c8d82

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/utils/sending.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ export async function sendJson(ops: {
77
}) {
88
setResponseStatus(ops.event, ops.status ?? 200);
99
appendCorsHeaders(ops.event, {
10-
origin: (origin: string) => {
11-
return origin === "https://xpui.app.spotify.com";
12-
},
10+
// @ts-expect-error: types are wrong...
11+
origin: "https://xpui.app.spotify.com",
1312
});
1413
await send(ops.event, JSON.stringify(ops.data, null, 2), "application/json");
1514
}

0 commit comments

Comments
 (0)