diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c49b737..119fe641 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `ignition` will be documented in this file +## 1.6.8 - 2019-09-18 + +- Use javascript content type for asset response - fixes #149 + ## 1.6.7 - 2019-09-18 - Load javascript assets via URL. Fixes #16 diff --git a/src/Http/Controllers/IgnitionAssetsController.php b/src/Http/Controllers/IgnitionAssetsController.php index f56263ce..58b71e34 100644 --- a/src/Http/Controllers/IgnitionAssetsController.php +++ b/src/Http/Controllers/IgnitionAssetsController.php @@ -2,10 +2,16 @@ namespace Facade\Ignition\Http\Controllers; +use Illuminate\Http\Response; + class IgnitionAssetsController { public function __invoke() { - return file_get_contents(__DIR__.'/../../../resources/compiled/ignition.js'); + $assetContent = file_get_contents(__DIR__.'/../../../resources/compiled/ignition.js'); + + return Response::create($assetContent, 200, [ + 'Content-Type' => 'application/javascript' + ]); } } \ No newline at end of file