NelmioCorsBundle ================ The NelmioCorsBundle allows you to send `Cross-Origin Resource Sharing`_ headers with ACL-style per-URL configuration. If you need it, check `this flow chart image`_ to have a global overview of entire CORS workflow. Installation ------------ Require the ``nelmio/cors-bundle`` package in your composer.json and update your dependencies: .. code-block:: terminal $ composer require nelmio/cors-bundle The bundle should be automatically enabled by `Symfony Flex`_. If you don't use Flex, you'll need to manually enable the bundle by adding the following line in the ``config/bundles.php`` file of your project:: ['all' => true], // ... ]; If you don't have a ``config/bundles.php`` file in your project, chances are that you're using an older Symfony version. In this case, you should have an ``app/AppKernel.php`` file instead. Edit such file:: getRequest()->getMethod()) { newrelic_ignore_transaction(); } } } Register this listener, and *voilĂ !* .. _`Cross-Origin Resource Sharing`: http://enable-cors.org/ .. _`this flow chart image`: http://www.html5rocks.com/static/images/cors_server_flowchart.png .. _`Symfony Flex`: https://symfony.com/doc/current/setup/flex.html .. _`as per the specification`: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers .. _`HTTP method overriding`: http://symfony.com/doc/current/reference/configuration/framework.html#http-method-override