Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Cors Laravel Package

fruitcake/laravel-cors

Laravel middleware to handle Cross-Origin Resource Sharing (CORS). Configure allowed origins, methods, headers, credentials, and exposed headers via a config file. Adds proper CORS response headers and supports preflight OPTIONS requests for APIs and SPAs.

View on GitHub
Deep Wiki
Context7
v3.0.0

Use the new fruitcake/php-cors stand-alone version instead of asm89/stack-cors. See https://github.com/fruitcake/php-cors/releases/tag/v1.0.0 for more information

v2.2.0

Revert namespace change on minor version See https://github.com/fruitcake/laravel-cors/pull/558 and https://github.com/fruitcake/laravel-cors/pull/557

3.x will still use fruitcake/php-cors

v2.1.0

Use the new fruitcake/php-cors stand-alone version instead of asm89/stack-cors. See https://github.com/fruitcake/php-cors/releases/tag/v1.0.0 for more information

v2.0.5
v2.0.4

To avoid memory leaks with Octane (https://github.com/fruitcake/laravel-cors/pull/469)

v2.0.3
v2.0.2

Add support for Laravel 8, drop unsupported versions.

v2.0.1

Uses v2.0.1 of stack-cors, re-enables reflective headers instead of wildcards.

v2.0.0

v2.0 (2020-05-11)

asm89/stack-cors 2.x is now used, with these notable changes:

Added

  • CORS headers are better cachable now, with correct Vary headers (#https://github.com/asm89/stack-cors/pull/70, #https://github.com/asm89/stack-cors/pull/74)

Changed

  • CORS headers are added to non-Origin requests when possible (#https://github.com/asm89/stack-cors/pull/73)
  • Requests are no longer blocked by the server, only by the browser (#https://github.com/asm89/stack-cors/pull/70)
v2.0.0-beta3
v1.0.6
v2.0.0-beta2
v2.0.0-beta1
  • Don't block CORS requests in Laravel, leave it to the browser
  • Update Vary headers for better caching
  • Use static/cacheable headers when possible
v1.0.5

Validate config values when creating the Service, instead of when used.

v1.0.4
v1.0.3
v1.0.2

php artisan vendor:publish --tag=cors

v1.0.1

1.0.1

Breaking changes

  • Adding the middleware on Route groups is no longer supported. You can use the new paths option to match your routes
  • The config file has been changed from camelCase to snake_case, please update your own config.
  • The deprecated Lumen ServiceProvider has been removed.
  • There is no need to manually configure the cors config in Lumen.

Added

  • The paths option is added to match certain routes only, while still using global middleware. This allows for better error handling.
v0.11.4
v0.11.3
v0.11.2
v0.11.1
v0.11.0

Breaking changes

  • The wildcard matcher is changed. You can use allowedOriginPatterns for your own patterns, or simple wildcards in the normal origins. Eg. *.laravel.com should still work.

Changes

  • Uses upstream asm/stack-cors (see #195)
  • Move tests to namespaces (See #277)
v0.10.1
v0.10.0
v0.9.3
v0.9.2
v0.9.1
v0.9.0
v0.8.6
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport