Skip to content

Commit

Permalink
Merge pull request #7 from ninjaparade/patch-1
Browse files Browse the repository at this point in the history
Check for JSON response
  • Loading branch information
JacobBennett authored Aug 18, 2016
2 parents 41c4f0d + ba295d2 commit c4efac5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Middleware/AddHttp2ServerPush.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function handle(Request $request, Closure $next)
{
$response = $next($request);

if ($response->isRedirection() || !$response instanceof Response) {
if ($response->isRedirection() || !$response instanceof Response || $request->isJson()) {
return $response;
}

Expand Down

0 comments on commit c4efac5

Please sign in to comment.