*
Showing
3 changed files
with
64 additions
and
83 deletions
| ... | @@ -8,8 +8,8 @@ | ... | @@ -8,8 +8,8 @@ |
| 8 | "php": "^7.3|^8.0", | 8 | "php": "^7.3|^8.0", |
| 9 | "ext-bcmath": "*", | 9 | "ext-bcmath": "*", |
| 10 | "ext-json": "*", | 10 | "ext-json": "*", |
| 11 | "barryvdh/laravel-cors": "^3.0", | ||
| 11 | "fideloper/proxy": "^4.4", | 12 | "fideloper/proxy": "^4.4", |
| 12 | "fruitcake/laravel-cors": "^2.0", | ||
| 13 | "godruoyi/php-snowflake": "^1.1", | 13 | "godruoyi/php-snowflake": "^1.1", |
| 14 | "guzzlehttp/guzzle": "^7.0.1", | 14 | "guzzlehttp/guzzle": "^7.0.1", |
| 15 | "laravel/framework": "^8.40", | 15 | "laravel/framework": "^8.40", | ... | ... |
| ... | @@ -4,20 +4,20 @@ | ... | @@ -4,20 +4,20 @@ |
| 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", | 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", |
| 5 | "This file is @generated automatically" | 5 | "This file is @generated automatically" |
| 6 | ], | 6 | ], |
| 7 | "content-hash": "e28041a4bc9847dee62a3829f3824c85", | 7 | "content-hash": "a4adabd22880255ff5fe7f498b6ed126", |
| 8 | "packages": [ | 8 | "packages": [ |
| 9 | { | 9 | { |
| 10 | "name": "asm89/stack-cors", | 10 | "name": "barryvdh/laravel-cors", |
| 11 | "version": "v2.1.1", | 11 | "version": "v3.0.0", |
| 12 | "source": { | 12 | "source": { |
| 13 | "type": "git", | 13 | "type": "git", |
| 14 | "url": "https://github.com/asm89/stack-cors.git", | 14 | "url": "https://github.com/fruitcake/laravel-cors.git", |
| 15 | "reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a" | 15 | "reference": "7c036ec08972d8d5d9db637e772af6887828faf5" |
| 16 | }, | 16 | }, |
| 17 | "dist": { | 17 | "dist": { |
| 18 | "type": "zip", | 18 | "type": "zip", |
| 19 | "url": "https://api.github.com/repos/asm89/stack-cors/zipball/73e5b88775c64ccc0b84fb60836b30dc9d92ac4a", | 19 | "url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/7c036ec08972d8d5d9db637e772af6887828faf5", |
| 20 | "reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a", | 20 | "reference": "7c036ec08972d8d5d9db637e772af6887828faf5", |
| 21 | "shasum": "", | 21 | "shasum": "", |
| 22 | "mirrors": [ | 22 | "mirrors": [ |
| 23 | { | 23 | { |
| ... | @@ -27,23 +27,31 @@ | ... | @@ -27,23 +27,31 @@ |
| 27 | ] | 27 | ] |
| 28 | }, | 28 | }, |
| 29 | "require": { | 29 | "require": { |
| 30 | "php": "^7.2|^8.0", | 30 | "fruitcake/php-cors": "^1.2", |
| 31 | "symfony/http-foundation": "^4|^5|^6", | 31 | "illuminate/contracts": "^6|^7|^8|^9", |
| 32 | "symfony/http-kernel": "^4|^5|^6" | 32 | "illuminate/support": "^6|^7|^8|^9", |
| 33 | "php": "^7.4|^8.0" | ||
| 33 | }, | 34 | }, |
| 34 | "require-dev": { | 35 | "require-dev": { |
| 35 | "phpunit/phpunit": "^7|^9", | 36 | "laravel/framework": "^6|^7.24|^8", |
| 37 | "orchestra/testbench-dusk": "^4|^5|^6|^7", | ||
| 38 | "phpunit/phpunit": "^9", | ||
| 36 | "squizlabs/php_codesniffer": "^3.5" | 39 | "squizlabs/php_codesniffer": "^3.5" |
| 37 | }, | 40 | }, |
| 38 | "type": "library", | 41 | "type": "library", |
| 39 | "extra": { | 42 | "extra": { |
| 40 | "branch-alias": { | 43 | "branch-alias": { |
| 41 | "dev-master": "2.1-dev" | 44 | "dev-master": "3.0-dev" |
| 45 | }, | ||
| 46 | "laravel": { | ||
| 47 | "providers": [ | ||
| 48 | "Fruitcake\\Cors\\CorsServiceProvider" | ||
| 49 | ] | ||
| 42 | } | 50 | } |
| 43 | }, | 51 | }, |
| 44 | "autoload": { | 52 | "autoload": { |
| 45 | "psr-4": { | 53 | "psr-4": { |
| 46 | "Asm89\\Stack\\": "src/" | 54 | "Fruitcake\\Cors\\": "src/" |
| 47 | } | 55 | } |
| 48 | }, | 56 | }, |
| 49 | "notification-url": "https://packagist.org/downloads/", | 57 | "notification-url": "https://packagist.org/downloads/", |
| ... | @@ -52,21 +60,36 @@ | ... | @@ -52,21 +60,36 @@ |
| 52 | ], | 60 | ], |
| 53 | "authors": [ | 61 | "authors": [ |
| 54 | { | 62 | { |
| 55 | "name": "Alexander", | 63 | "name": "Fruitcake", |
| 56 | "email": "iam.asm89@gmail.com" | 64 | "homepage": "https://fruitcake.nl" |
| 65 | }, | ||
| 66 | { | ||
| 67 | "name": "Barry vd. Heuvel", | ||
| 68 | "email": "barryvdh@gmail.com" | ||
| 57 | } | 69 | } |
| 58 | ], | 70 | ], |
| 59 | "description": "Cross-origin resource sharing library and stack middleware", | 71 | "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application", |
| 60 | "homepage": "https://github.com/asm89/stack-cors", | ||
| 61 | "keywords": [ | 72 | "keywords": [ |
| 73 | "api", | ||
| 62 | "cors", | 74 | "cors", |
| 63 | "stack" | 75 | "crossdomain", |
| 76 | "laravel" | ||
| 64 | ], | 77 | ], |
| 65 | "support": { | 78 | "support": { |
| 66 | "issues": "https://github.com/asm89/stack-cors/issues", | 79 | "issues": "https://github.com/fruitcake/laravel-cors/issues", |
| 67 | "source": "https://github.com/asm89/stack-cors/tree/v2.1.1" | 80 | "source": "https://github.com/fruitcake/laravel-cors/tree/v3.0.0" |
| 68 | }, | 81 | }, |
| 69 | "time": "2022-01-18T09:12:03+00:00" | 82 | "funding": [ |
| 83 | { | ||
| 84 | "url": "https://fruitcake.nl", | ||
| 85 | "type": "custom" | ||
| 86 | }, | ||
| 87 | { | ||
| 88 | "url": "https://github.com/barryvdh", | ||
| 89 | "type": "github" | ||
| 90 | } | ||
| 91 | ], | ||
| 92 | "time": "2022-02-23T14:53:22+00:00" | ||
| 70 | }, | 93 | }, |
| 71 | { | 94 | { |
| 72 | "name": "brick/math", | 95 | "name": "brick/math", |
| ... | @@ -600,17 +623,17 @@ | ... | @@ -600,17 +623,17 @@ |
| 600 | "time": "2020-10-22T13:48:01+00:00" | 623 | "time": "2020-10-22T13:48:01+00:00" |
| 601 | }, | 624 | }, |
| 602 | { | 625 | { |
| 603 | "name": "fruitcake/laravel-cors", | 626 | "name": "fruitcake/php-cors", |
| 604 | "version": "v2.2.0", | 627 | "version": "v1.2.0", |
| 605 | "source": { | 628 | "source": { |
| 606 | "type": "git", | 629 | "type": "git", |
| 607 | "url": "https://github.com/fruitcake/laravel-cors.git", | 630 | "url": "https://github.com/fruitcake/php-cors.git", |
| 608 | "reference": "783a74f5e3431d7b9805be8afb60fd0a8f743534" | 631 | "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e" |
| 609 | }, | 632 | }, |
| 610 | "dist": { | 633 | "dist": { |
| 611 | "type": "zip", | 634 | "type": "zip", |
| 612 | "url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/783a74f5e3431d7b9805be8afb60fd0a8f743534", | 635 | "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/58571acbaa5f9f462c9c77e911700ac66f446d4e", |
| 613 | "reference": "783a74f5e3431d7b9805be8afb60fd0a8f743534", | 636 | "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e", |
| 614 | "shasum": "", | 637 | "shasum": "", |
| 615 | "mirrors": [ | 638 | "mirrors": [ |
| 616 | { | 639 | { |
| ... | @@ -620,26 +643,18 @@ | ... | @@ -620,26 +643,18 @@ |
| 620 | ] | 643 | ] |
| 621 | }, | 644 | }, |
| 622 | "require": { | 645 | "require": { |
| 623 | "asm89/stack-cors": "^2.0.1", | 646 | "php": "^7.4|^8.0", |
| 624 | "illuminate/contracts": "^6|^7|^8|^9", | 647 | "symfony/http-foundation": "^4.4|^5.4|^6" |
| 625 | "illuminate/support": "^6|^7|^8|^9", | ||
| 626 | "php": ">=7.2" | ||
| 627 | }, | 648 | }, |
| 628 | "require-dev": { | 649 | "require-dev": { |
| 629 | "laravel/framework": "^6|^7.24|^8", | 650 | "phpstan/phpstan": "^1.4", |
| 630 | "orchestra/testbench-dusk": "^4|^5|^6|^7", | 651 | "phpunit/phpunit": "^9", |
| 631 | "phpunit/phpunit": "^6|^7|^8|^9", | ||
| 632 | "squizlabs/php_codesniffer": "^3.5" | 652 | "squizlabs/php_codesniffer": "^3.5" |
| 633 | }, | 653 | }, |
| 634 | "type": "library", | 654 | "type": "library", |
| 635 | "extra": { | 655 | "extra": { |
| 636 | "branch-alias": { | 656 | "branch-alias": { |
| 637 | "dev-master": "2.1-dev" | 657 | "dev-main": "1.1-dev" |
| 638 | }, | ||
| 639 | "laravel": { | ||
| 640 | "providers": [ | ||
| 641 | "Fruitcake\\Cors\\CorsServiceProvider" | ||
| 642 | ] | ||
| 643 | } | 658 | } |
| 644 | }, | 659 | }, |
| 645 | "autoload": { | 660 | "autoload": { |
| ... | @@ -657,20 +672,20 @@ | ... | @@ -657,20 +672,20 @@ |
| 657 | "homepage": "https://fruitcake.nl" | 672 | "homepage": "https://fruitcake.nl" |
| 658 | }, | 673 | }, |
| 659 | { | 674 | { |
| 660 | "name": "Barry vd. Heuvel", | 675 | "name": "Barryvdh", |
| 661 | "email": "barryvdh@gmail.com" | 676 | "email": "barryvdh@gmail.com" |
| 662 | } | 677 | } |
| 663 | ], | 678 | ], |
| 664 | "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application", | 679 | "description": "Cross-origin resource sharing library for the Symfony HttpFoundation", |
| 680 | "homepage": "https://github.com/fruitcake/php-cors", | ||
| 665 | "keywords": [ | 681 | "keywords": [ |
| 666 | "api", | ||
| 667 | "cors", | 682 | "cors", |
| 668 | "crossdomain", | 683 | "laravel", |
| 669 | "laravel" | 684 | "symfony" |
| 670 | ], | 685 | ], |
| 671 | "support": { | 686 | "support": { |
| 672 | "issues": "https://github.com/fruitcake/laravel-cors/issues", | 687 | "issues": "https://github.com/fruitcake/php-cors/issues", |
| 673 | "source": "https://github.com/fruitcake/laravel-cors/tree/v2.2.0" | 688 | "source": "https://github.com/fruitcake/php-cors/tree/v1.2.0" |
| 674 | }, | 689 | }, |
| 675 | "funding": [ | 690 | "funding": [ |
| 676 | { | 691 | { |
| ... | @@ -682,7 +697,7 @@ | ... | @@ -682,7 +697,7 @@ |
| 682 | "type": "github" | 697 | "type": "github" |
| 683 | } | 698 | } |
| 684 | ], | 699 | ], |
| 685 | "time": "2022-02-23T14:25:13+00:00" | 700 | "time": "2022-02-20T15:07:15+00:00" |
| 686 | }, | 701 | }, |
| 687 | { | 702 | { |
| 688 | "name": "godruoyi/php-snowflake", | 703 | "name": "godruoyi/php-snowflake", | ... | ... |
config/cors.php
deleted
100644 → 0
| 1 | <?php | ||
| 2 | |||
| 3 | return [ | ||
| 4 | |||
| 5 | /* | ||
| 6 | |-------------------------------------------------------------------------- | ||
| 7 | | Cross-Origin Resource Sharing (CORS) Configuration | ||
| 8 | |-------------------------------------------------------------------------- | ||
| 9 | | | ||
| 10 | | Here you may configure your settings for cross-origin resource sharing | ||
| 11 | | or "CORS". This determines what cross-origin operations may execute | ||
| 12 | | in web browsers. You are free to adjust these settings as needed. | ||
| 13 | | | ||
| 14 | | To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS | ||
| 15 | | | ||
| 16 | */ | ||
| 17 | |||
| 18 | 'paths' => ['api/*', 'release/*', 'sanctum/csrf-cookie'], | ||
| 19 | |||
| 20 | 'allowed_methods' => ['*'], | ||
| 21 | |||
| 22 | 'allowed_origins' => ['*'], | ||
| 23 | |||
| 24 | 'allowed_origins_patterns' => [], | ||
| 25 | |||
| 26 | 'allowed_headers' => ['*'], | ||
| 27 | |||
| 28 | 'exposed_headers' => [], | ||
| 29 | |||
| 30 | 'max_age' => 0, | ||
| 31 | |||
| 32 | 'supports_credentials' => false, | ||
| 33 | |||
| 34 | ]; |
-
Please register or sign in to post a comment