Skip to content

Commit

Permalink
fix response to return header allow origin
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Bohuncak committed Jun 26, 2023
1 parent daaa739 commit 4f1afa1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion application/public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ function callAtlassian(HandlerInterface $handler, Request $request, Response $re
];
try {
$request = procesJsonRequest($request);
return $handler->handle($request);
$response = $handler->handle($request);
return new \GuzzleHttp\Psr7\Response(
$response->getStatusCode(),
$headers,
$response->getBody()
);
} catch (\Exception $e) {
$response = $response->withStatus(500);
$response->getBody()->write($e->getMessage());
Expand Down

0 comments on commit 4f1afa1

Please sign in to comment.