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