Skip to content

Open-source status page, incident response and uptime monitoring

🔑 cors opoenapi

Thibault Le Ouay45d49c172b2c
diff --git a/apps/server/src/v1/index.ts b/apps/server/src/v1/index.ts
index 86780e64a..2019e474f 100644
--- a/apps/server/src/v1/index.ts
+++ b/apps/server/src/v1/index.ts
@@ -1,4 +1,5 @@
import { OpenAPIHono } from "@hono/zod-openapi";
+import { cors } from "hono/cors";
import { logger } from "hono/logger";
import { page } from "@openstatus/db/src/schema";
@@ -24,6 +25,8 @@ export type Variables = {
export const api = new OpenAPIHono<{ Variables: Variables }>();
+api.use("/openapi", cors());
+
api.doc("/openapi", {
openapi: "3.0.0",
info: {