Skip to content

Commit

Permalink
check for doctype
Browse files Browse the repository at this point in the history
  • Loading branch information
markvaneijk committed May 10, 2024
1 parent 869206c commit 754194a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Middleware/MinifyHtml.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public function shouldMinifyHtml(Request $request)
return false;
}

if(stripos(substr($request->getContent(), 0, 100), '<!DOCTYPE') !== false) {
return false;
}

return true;
}
}

0 comments on commit 754194a

Please sign in to comment.