Add Access-Control-Allow-Origin

Cross-site HTTP requests are HTTP requests for resources from a different domain than the domain of the resource making the request. For instance, a resource loaded from Domain A (http://www.liplex.de) such as an HTML web page, makes a request for a resource on Domain B (http://api.liplex.de), such as an image, using the img element (http://api.liplex.de/image.jpg).

Most of times it's relevant when doing Ajax requests. If you want to make them possible you need to actively enable it.

To enable this, you ether have to set it as a server configuration or directly as a header of the Symfony\Component\HttpFoundation\Response class.

$response->headers->set('Access-Control-Allow-Origin', '*');