diff --git a/api/src/api.ts b/api/src/api.ts index 0222d07..5cc0191 100644 --- a/api/src/api.ts +++ b/api/src/api.ts @@ -1,4 +1,5 @@ import { Hono } from 'hono'; +import { cors } from 'hono/cors'; import Fuse from 'fuse.js'; import { @@ -14,6 +15,9 @@ import index from '../public/index.html' /* Create new Hono app */ const app = new Hono({ strict: false }); +/* Enable CORS for all routes */ +app.use('*', cors()); + /* Serve the index page (which contains the Swagger Docs) */ app.get("/", async (ctx) => { if (index) {