keboola/cors

Minimalistic CORS handlers for Symfony apps

Maintainers

Details

github.com/keboola/cors

Source

Installs: 4 152

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 13

Forks: 0

0.3.0 2022-09-21 08:29 UTC

This package is auto-updated.

Last update: 2023-01-21 09:25:59 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.