Skip to content
This repository was archived by the owner on Apr 11, 2026. It is now read-only.

Commit 64a5134

Browse files
committed
fix(api): add cors
1 parent f79c653 commit 64a5134

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

api/src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@ import { OpenAPIHono } from "@hono/zod-openapi";
22
import { guildsRouter } from "./router/guilds";
33
import { channelsRouter } from "./router/channels";
44
import { createAnalyticsCronJob } from "./analytics";
5+
import { cors } from "hono/cors";
56

67
const app = new OpenAPIHono();
78

89
createAnalyticsCronJob();
910

11+
app.use(
12+
cors({
13+
origin: "*",
14+
allowMethods: ["GET"],
15+
})
16+
);
17+
1018
app.get("/", (c) => {
1119
return c.json({
1220
message: "Hello World",

0 commit comments

Comments
 (0)