Skip to content

Commit

Permalink
fix(sending): properly set origin header
Browse files Browse the repository at this point in the history
  • Loading branch information
rxri committed Jun 4, 2024
1 parent 109c570 commit 72c8d82
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/utils/sending.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ export async function sendJson(ops: {
}) {
setResponseStatus(ops.event, ops.status ?? 200);
appendCorsHeaders(ops.event, {
origin: (origin: string) => {
return origin === "https://xpui.app.spotify.com";
},
// @ts-expect-error: types are wrong...
origin: "https://xpui.app.spotify.com",
});
await send(ops.event, JSON.stringify(ops.data, null, 2), "application/json");
}

0 comments on commit 72c8d82

Please sign in to comment.