mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 15:05:35 +00:00
chore: init adonis
This commit is contained in:
19
config/cors.ts
Normal file
19
config/cors.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
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: [],
|
||||
methods: ['GET', 'HEAD', 'POST', 'PUT', 'DELETE'],
|
||||
headers: true,
|
||||
exposeHeaders: [],
|
||||
credentials: true,
|
||||
maxAge: 90,
|
||||
});
|
||||
|
||||
export default corsConfig;
|
||||
Reference in New Issue
Block a user