mirror of
https://github.com/notrab/dumbo.git
synced 2025-01-17 14:18:14 +01:00
3dd75fce79
* feat: add cors middleware helper, add `all` route handler * revert changes * update cors helper --------- Co-authored-by: Jamie Barton <jamie@notrab.dev>
JSON Example
This example demonstrates how to enable CORS in Dumbo.
Running the Example
-
Install dependencies:
composer install
-
Start the server:
composer start
-
Make a request with CORS middleware enabled:
curl -H "Origin: http://example.com" \ -H "Accept: application/json" \ -X GET \ http://localhost:8000/ \ -v