mirror of
https://github.com/henry4682/finance_app.git
synced 2026-07-16 00:10:00 +00:00
Compare commits
2 Commits
fb7862baff
...
60832c5722
| Author | SHA1 | Date | |
|---|---|---|---|
| 60832c5722 | |||
| d8c5c541e0 |
29
.gitignore
vendored
29
.gitignore
vendored
@@ -1,29 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
*.log
|
|
||||||
.DS_Store
|
|
||||||
.env
|
|
||||||
.env.backup
|
|
||||||
.env.production
|
|
||||||
.phpactor.json
|
|
||||||
.phpunit.result.cache
|
|
||||||
/.fleet
|
|
||||||
/.idea
|
|
||||||
/.nova
|
|
||||||
/.phpunit.cache
|
|
||||||
/.vscode
|
|
||||||
/.zed
|
|
||||||
/auth.json
|
|
||||||
/node_modules
|
|
||||||
/public/build
|
|
||||||
/public/hot
|
|
||||||
/public/storage
|
|
||||||
/storage/*.key
|
|
||||||
/storage/pail
|
|
||||||
/vendor
|
|
||||||
Homestead.json
|
|
||||||
Homestead.yaml
|
|
||||||
Thumbs.db
|
|
||||||
=======
|
|
||||||
/vendor/
|
/vendor/
|
||||||
node_modules/
|
node_modules/
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
@@ -43,10 +17,12 @@ public_html/hot
|
|||||||
|
|
||||||
storage/*.key
|
storage/*.key
|
||||||
.env
|
.env
|
||||||
|
.env.dev
|
||||||
Homestead.yaml
|
Homestead.yaml
|
||||||
Homestead.json
|
Homestead.json
|
||||||
/.vagrant
|
/.vagrant
|
||||||
.phpunit.result.cache
|
.phpunit.result.cache
|
||||||
|
/app/public/storage
|
||||||
|
|
||||||
/public/build
|
/public/build
|
||||||
/storage/pail
|
/storage/pail
|
||||||
@@ -54,4 +30,3 @@ Homestead.json
|
|||||||
.env.production
|
.env.production
|
||||||
.phpactor.json
|
.phpactor.json
|
||||||
auth.json
|
auth.json
|
||||||
>>>>>>> 5123647b7180bb2fdc0760039c8e38d903dc15eb
|
|
||||||
|
|||||||
@@ -1,38 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
'paths' => ['api/*', 'v1/*', 'auth/*', 'sanctum/csrf-cookie'],
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Cross-Origin Resource Sharing (CORS) Configuration
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Here you may configure your settings for cross-origin resource sharing
|
|
||||||
| or "CORS". This determines what cross-origin operations may execute
|
|
||||||
| in web browsers. You are free to adjust these settings as needed.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
// 🟢 修正 1:確保包含你要戳的所有 API 路徑(包含上傳)
|
|
||||||
'paths' => ['api/*', 'sanctum/csrf-cookie', 'login', 'logout'],
|
|
||||||
|
|
||||||
// 🟢 修正 2:允許前端傳入的 HTTP 方法(GET, POST, PUT, DELETE 都要開)
|
|
||||||
'allowed_methods' => ['*'],
|
'allowed_methods' => ['*'],
|
||||||
|
'allowed_origins' => ['https://fin-buddy.duckdns.org', 'http://localhost:5173', 'http://127.0.0.1:5173'],
|
||||||
// 🟢 修正 3:精準允許你的 Vue 前端開發網址(看你前端是在 5173 還是其他埠號)
|
|
||||||
// 你也可以直接寫 ['*'] 偷懶大開,但在本地端寫特定網址更安全:
|
|
||||||
'allowed_origins' => ['http://localhost:5173', 'http://127.0.0.1:5173'],
|
|
||||||
|
|
||||||
'allowed_origins_patterns' => [],
|
'allowed_origins_patterns' => [],
|
||||||
|
|
||||||
// 🟢 修正 4:上傳 FormData 時會帶有 Content-Type 等 Header,必須全開
|
|
||||||
'allowed_headers' => ['*'],
|
'allowed_headers' => ['*'],
|
||||||
|
|
||||||
'exposed_headers' => [],
|
'exposed_headers' => [],
|
||||||
|
|
||||||
'max_age' => 0,
|
'max_age' => 0,
|
||||||
|
|
||||||
// 🟢 修正 5:非常關鍵!因為我們用了 Sanctum 驗證狀態,必須允許傳遞 Cookie/憑證
|
|
||||||
'supports_credentials' => true,
|
'supports_credentials' => true,
|
||||||
|
];
|
||||||
];
|
|
||||||
|
|||||||
11861
storage/logs/laravel.log
Normal file
11861
storage/logs/laravel.log
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user