Skip to content

Commit

Permalink
Suppression header content-type
Browse files Browse the repository at this point in the history
  • Loading branch information
prytoegrian committed Dec 12, 2018
1 parent 10eb042 commit 138179a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Tools/Middlewares/HeadersChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ final class HeadersChecker extends \LibertAPI\Tools\AMiddleware
{
public function __invoke(IRequest $request, IResponse $response, callable $next) : IResponse
{
/* /!\ Headers non versionnés */
$json = 'application/json';
if ($request->getHeaderLine('Accept') === $json
&& $request->getHeaderLine('Content-Type') === $json
) {
if ('application/json' === $request->getHeaderLine('Accept')) {
return $next($request, $response);
}
return call_user_func(
Expand Down

0 comments on commit 138179a

Please sign in to comment.