Skip to content

Commit

Permalink
Merge pull request #27 from joselara/dev-streamedresponsefix
Browse files Browse the repository at this point in the history
Middleware fix for StreamedResponse
  • Loading branch information
KABBOUCHI authored Nov 30, 2018
2 parents 9253c81 + e4f3062 commit 063c626
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Http/Middleware/Impersonate.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Illuminate\Http\Response;
use Lab404\Impersonate\Services\ImpersonateManager;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\StreamedResponse;

class Impersonate
{
Expand All @@ -32,6 +33,8 @@ public function handle($request, $next)
!($response instanceof RedirectResponse) &&

!($response instanceof BinaryFileResponse) &&

!($response instanceof StreamedResponse) &&

$request->acceptsHtml() &&

Expand Down

0 comments on commit 063c626

Please sign in to comment.