keboola/cors

Minimalistic CORS handlers for Symfony apps

Maintainers

Details

github.com/keboola/cors

Source

Installs: 12 024

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 18

Forks: 0

0.4.0 2024-02-20 11:43 UTC

This package is auto-updated.

Last update: 2024-11-20 13:27:18 UTC


README

Adds CORS headers and OPTIONS response to all API endpoints

Usage

composer require keboola/cors

Add this to the services.yaml file:

    Keboola\Cors\CorsListener:
        arguments:
            -  
        tags:
            - { name: kernel.event_listener, event: kernel.request }
            - { name: kernel.event_listener, event: kernel.response }

    Keboola\Cors\ResponseHeadersListener:
        tags:
            - { name: kernel.event_listener, event: kernel.response }

Development

Run the tests:

docker-compose build
docker-compose run tests

To run tests with local code use:

docker-compose run tests-local composer install
docker-compose run tests-local

License

MIT licensed, see LICENSE file.