From 1b99839955e6596fcb6f9361cf1545516d81ae4e Mon Sep 17 00:00:00 2001 From: Fabio Nettis Date: Wed, 20 Mar 2024 09:25:57 +0100 Subject: [PATCH] fix: resolve cors issues (#13) --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 2132f0d..65baab8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,7 @@ import "jobs/refresh"; import { Hono } from "hono"; +import { cors } from "hono/cors"; import cache from "middleware/cache"; import rateLimit from "middleware/rate-limit"; @@ -18,6 +19,7 @@ import stratagems from "routes/stratagems"; const app = new Hono().basePath("/api"); // middleware for the api +app.use("/*", cors()); app.use(rateLimit); app.use(cache);