Skip to content

Commit

Permalink
add cors stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmossas committed Jun 12, 2024
1 parent 8973fd3 commit 3583696
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions playground/src/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { ArriApp } from "@arrirpc/server";
import { ArriApp, handleCors } from "@arrirpc/server";

const app = new ArriApp({});
const app = new ArriApp({
onRequest(event) {
handleCors(event, {
origin: "*",
});
},
});

export default app;

0 comments on commit 3583696

Please sign in to comment.