generated from ainunns/laravel-react-ts-inertia-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add CORS configuration file for API access
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
return [ | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| 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. | ||
| | ||
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS | ||
| | ||
*/ | ||
|
||
'paths' => ['api/*', 'sanctum/csrf-cookie'], | ||
|
||
'allowed_methods' => ['*'], | ||
|
||
'allowed_origins' => ['*'], | ||
|
||
'allowed_origins_patterns' => [], | ||
|
||
'allowed_headers' => ['*'], | ||
|
||
'exposed_headers' => [], | ||
|
||
'max_age' => 0, | ||
|
||
'supports_credentials' => false, | ||
|
||
]; |