A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
fix(api): Fix handling for CORS after the trpc move to hono. Fixes #1709
Mohamed Bassemaae3ef17eccf
diff --git a/packages/api/index.ts b/packages/api/index.tsindex 4103e033..a2882381 100644--- a/packages/api/index.ts+++ b/packages/api/index.ts@@ -1,5 +1,6 @@import { Hono } from "hono";import { logger } from "hono/logger";+import { cors } from "hono/cors";import { poweredBy } from "hono/powered-by";import { Context } from "@karakeep/trpc";@@ -38,6 +39,11 @@ const app = new Hono<{}>().use(logger()).use(poweredBy())+ .use(cors({+ origin: "*",+ allowHeaders: ["Authorization", "Content-Type"],+ credentials: true,+ })).use("*", registerMetrics).use(async (c, next) => {// Ensure that the ctx is set