Skip to content

Commit

Permalink
fix: resolve cors issues (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabio-nettis authored Mar 20, 2024
1 parent 762e336 commit 1b99839
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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);

Expand Down

0 comments on commit 1b99839

Please sign in to comment.