Skip to content

Commit 65f6dfd

Browse files
authored
Merge pull request #52 from Mahmoud1478/main
fix upercase 'utf' in 'InjectJavascriptLibrary' Middleware
2 parents 260c6bd + 73e4b4a commit 65f6dfd

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.idea/.gitignore

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Adapters/Laravel/Http/Middleware/InjectJavascriptLibrary.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function handle(Request $request, Closure $next): Response
3333
/** @var Response $response */
3434
$response = $next($request);
3535

36-
if ($response->headers->get('Content-Type') === 'text/html; charset=UTF-8') {
36+
if (strtolower($response->headers->get('Content-Type') ?? '') === 'text/html; charset=utf-8') {
3737
$content = (string) $response->getContent();
3838

3939
if (! str_contains($content, '</html>') || ! str_contains($content, '</body>')) {

0 commit comments

Comments
 (0)