dumbo/examples/cors/README.md
Khairul Hidayat 3dd75fce79
Add cors middleware helper and all route handler (#13)
* feat: add cors middleware helper, add `all` route handler

* revert changes

* update cors helper

---------

Co-authored-by: Jamie Barton <jamie@notrab.dev>
2024-09-06 17:16:02 +01:00

419 B

JSON Example

This example demonstrates how to enable CORS in Dumbo.

Running the Example

  1. Install dependencies:

    composer install
    
  2. Start the server:

    composer start
    
  3. Make a request with CORS middleware enabled:

     curl -H "Origin: http://example.com" \
      -H "Accept: application/json" \
      -X GET \
      http://localhost:8000/ \
      -v