Skip to content

Commit

Permalink
Use javascript content type for asset response - fixes #149
Browse files Browse the repository at this point in the history
  • Loading branch information
mpociot committed Sep 18, 2019
1 parent bd3e661 commit f733d7c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion src/Http/Controllers/IgnitionAssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
]);
}
}

0 comments on commit f733d7c

Please sign in to comment.