Closed eightyfive closed 7 years ago
Hi,
There is bug in the middleware when choosing to modify the response or not: https://github.com/Folkloreatelier/laravel-hypernova/blob/master/src/Folklore/Hypernova/Hypernova.php#L124
This line:
$response->headers->has('Content-Type') === 'text/html'
Should be (or the like):
strpos($response->headers->get('Content-Type'), 'text/html') !== false
Also, as a side note, I believe deciding whether or not to modify the response should be handled in the middleware itself:
// Move conditions in Middleware if ($response instanceof BaseResponse && !$response->isRedirection() && ( !$response->headers->has('Content-Type') || strpos($response->headers->get('Content-Type'), 'text/html') !== false ) ) { ...
Makes a lot of sense, will commit this soon
Should be fixed in v0.1.1
Hi,
There is bug in the middleware when choosing to modify the response or not: https://github.com/Folkloreatelier/laravel-hypernova/blob/master/src/Folklore/Hypernova/Hypernova.php#L124
This line:
Should be (or the like):
Also, as a side note, I believe deciding whether or not to modify the response should be handled in the middleware itself: