Permalink
Browse files

Include CORS headers in responses

  • Loading branch information...
lanthaler committed Jun 15, 2015
1 parent e5c66b5 commit 1ad44ed287df87cd76d63904aaea655670a4ab1f
Showing with 5 additions and 0 deletions.
  1. +5 −0 EventListener/ResponseListener.php
@@ -44,6 +44,11 @@ public function onKernelResponse(FilterResponseEvent $event)
{
$response = $event->getResponse();
$response->headers->set('Access-Control-Allow-Origin', '*');
$response->headers->set('Access-Control-Allow-Credentials', 'true');
$response->headers->set('Access-Control-Expose-Headers', 'Link');
$response->headers->set('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE');
$response->headers->set(
'Link',
'<' . $this->hydra->getDocumentationUrl() . '>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation"'

0 comments on commit 1ad44ed

Please sign in to comment.