Skip to content

Commit a7dd29f

Browse files
committed
Avoid wrapping html responses
1 parent bd2ae7b commit a7dd29f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Middleware/BrowsableApi.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ public function handle($request, Closure $next)
2222
return $response;
2323
}
2424

25+
if ($response->headers->get('Content-Type', 'text/html') == 'text/html') {
26+
return $response;
27+
}
28+
2529
$prettify = config('browsable-api.prettify');
2630
if ($prettify) {
2731
$response->setContent(is_callable($prettify) ? $prettify($response) : $this->prettify($response));

0 commit comments

Comments
 (0)