diff --git a/index.ts b/index.ts index 52b6067b..f0ae8edd 100644 --- a/index.ts +++ b/index.ts @@ -1,6 +1,6 @@ import { dualLogger } from "@loggers"; import { connectMeili } from "@meilisearch"; -import { errorResponse } from "@response"; +import { errorResponse, response } from "@response"; import { config } from "config-manager"; import { Hono } from "hono"; import { LogLevel, LogManager, type MultiLogManager } from "log-manager"; @@ -124,6 +124,10 @@ for (const [route, path] of Object.entries(routes)) { route.default(app); } +app.options("*", async () => { + return response(null); +}); + app.all("*", async (context) => { if (config.frontend.glitch.enabled) { const glitch = await handleGlitchRequest(context.req.raw, dualLogger);