upd: tambah cors

This commit is contained in:
2025-11-07 12:06:04 +08:00
parent 0e5fab6a84
commit 14ec81d98d

View File

@@ -13,6 +13,7 @@ import { MCPRoute } from "./server/routes/mcp_route";
import PelayananRoute from "./server/routes/pelayanan_surat_route";
import PengaduanRoute from "./server/routes/pengaduan_route";
import UserRoute from "./server/routes/user_route";
import cors from "@elysiajs/cors"
const Docs = new Elysia({
tags: ["docs"],
@@ -40,6 +41,11 @@ const app = new Elysia()
.use(Api)
.use(Docs)
.use(Auth)
.use(cors({
origin: "*",
methods: ["GET", "POST", "OPTIONS"],
allowedHeaders: ["Content-Type"],
}))
.get(
"/.well-known/mcp.json",
async () => {