fix: add preflight CORS options for api.pingql.com
This commit is contained in:
parent
9fb90d9ea8
commit
7a9417297f
|
|
@ -12,6 +12,9 @@ const app = new Elysia()
|
|||
.use(cors({
|
||||
origin: process.env.CORS_ORIGINS?.split(",") ?? ["https://pingql.com"],
|
||||
credentials: true,
|
||||
allowedHeaders: ["Content-Type", "Authorization"],
|
||||
methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"],
|
||||
preflight: true,
|
||||
}))
|
||||
.get("/", () => ({
|
||||
name: "PingQL API",
|
||||
|
|
|
|||
Loading…
Reference in New Issue