wikipedia-game-solver/apps/api/config/cors.ts

19 lines
458 B
TypeScript
Raw Normal View History

2024-08-09 23:51:41 +02:00
import { defineConfig } from "@adonisjs/cors"
/**
* Configuration options to tweak the CORS policy. The following options are documented on the official documentation website.
*
* https://docs.adonisjs.com/guides/security/cors
*/
const corsConfig = defineConfig({
enabled: true,
origin: true,
methods: ["GET", "HEAD", "POST", "PUT", "DELETE"],
headers: true,
exposeHeaders: [],
credentials: true,
maxAge: 90,
})
export default corsConfig