Skip to content

Commit

Permalink
Added "Access-Control-Allow-Origin" Header
Browse files Browse the repository at this point in the history
  • Loading branch information
saibotd authored May 2, 2019
1 parent 97f0aa6 commit 66e873d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Controller/ContentApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ private function handle(Request $request){
$readers = $this->getParameter('content_api_readers');
$this->frontendApi = new FrontendApi($readers);
$this->container->get('contao.framework')->initialize();
return $this->json($this->frontendApi->handle($request));
$response = $this->json($this->frontendApi->handle($request));
$response->headers->add(['Access-Control-Allow-Origin' => '*']);
return $response;
}

/**
Expand Down

0 comments on commit 66e873d

Please sign in to comment.