chore: 首次提交 - 关联 GitHub fnvtk/MBTI_wang

Made-with: Cursor
This commit is contained in:
卡若
2026-03-17 12:39:38 +08:00
commit eb510304c0
259 changed files with 60464 additions and 0 deletions

18
api/config/cors.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
// 跨域配置
return [
// 允许的跨域来源(生产环境写死具体域名)
'allow_origin' => '*',
// 允许的HTTP方法
'allow_methods' => env('cors.allow_methods', 'GET,POST,PUT,DELETE,OPTIONS'),
// 允许的请求头
'allow_headers' => env('cors.allow_headers', 'Content-Type,Authorization,X-Requested-With,Accept'),
// 是否允许携带凭证(如果以后要带 cookie 再改成 true
'allow_credentials' => env('cors.allow_credentials', false),
// 预检请求缓存时间(秒)
'max_age' => env('cors.max_age', 86400),
];