Skip to content
Browse files

Only show toolbar for text/html response types.

  • Loading branch information...
1 parent 03fc874 commit a1b3763177eb9d19614a4db0f3e0ee13242f5d26 @pnomolos pnomolos committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 config/bootstrap/dispatcher.php
View
6 config/bootstrap/dispatcher.php
@@ -50,7 +50,11 @@
// Render the toolbar (unless it's an asset from the li3_perf library)
// Why? See li3_perf\extensions\util\Asset
- if(!isset($params['request']->params['asset_type'])) {
+ $content_type = isset($result->headers['Content-Type']) ? join('', explode(';', $result->headers['Content-Type'], 1)) : '';
+ if(
+ !isset($params['request']->params['asset_type']) &&
+ (!$content_type || $content_type == 'text/html')
+ )
$skip = false;
$li3_perf = Libraries::get('li3_perf');
if(isset($li3_perf['skip'])) {

0 comments on commit a1b3763

Please sign in to comment.
Something went wrong with that request. Please try again.