diff --git a/src/Http/Middleware/Impersonate.php b/src/Http/Middleware/Impersonate.php index d1be999..bbdc40f 100644 --- a/src/Http/Middleware/Impersonate.php +++ b/src/Http/Middleware/Impersonate.php @@ -41,7 +41,9 @@ public function handle($request, $next) !$request->expectsJson() && - starts_with($response->headers->get('Content-Type'), 'text/html') + starts_with($response->headers->get('Content-Type'), 'text/html') && + + !str_contains($request->path(), 'nova-api') ) { /** @var Response $response * */