A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
fix: manifest is not loaded by browser since it isnt public
aminnausin62f6263f76c4
diff --git a/.dockerignore b/.dockerignoreindex 04589269..a8b67c39 100644--- a/.dockerignore+++ b/.dockerignore@@ -4,6 +4,7 @@public/buildpublic/hotpublic/storage+public/manifest.jsonstorage/*.keystorage/pailstorage/app@@ -36,5 +37,6 @@ Dockerfiledocker-compose.ymlsetup.*+!storage/app/public/avatars/default.jpg!storage/app/public/thumbnails/default.webpdiff --git a/.gitignore b/.gitignoreindex 3c29c689..aa612a05 100755--- a/.gitignore+++ b/.gitignore@@ -40,3 +40,4 @@ install.sh/coverage/database/schema/database/dump+public/manifest.jsondiff --git a/app/Console/Commands/GenerateManifest.php b/app/Console/Commands/GenerateManifest.phpindex 03272fe7..acf6239b 100644--- a/app/Console/Commands/GenerateManifest.php+++ b/app/Console/Commands/GenerateManifest.php@@ -24,7 +24,7 @@ class GenerateManifest extends Command {'cpu_cores' => shell_exec('nproc') ?: 'unknown',], JSON_PRETTY_PRINT);- File::put(storage_path('app/manifest.json'), $data);+ File::put(public_path('manifest.json'), $data);$this->info("App manifest generated: $version ($commit)");}diff --git a/app/Support/AppManifest.php b/app/Support/AppManifest.phpindex 4ec06ab4..6458fb48 100644--- a/app/Support/AppManifest.php+++ b/app/Support/AppManifest.php@@ -7,7 +7,7 @@ use Illuminate\Support\Facades\File;class AppManifest {public static function info(): array {- $path = storage_path('app/manifest.json');+ $path = public_path('manifest.json');if (! File::exists($path)) {Artisan::call('app:manifest');diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.phpindex a3d4d173..5a71578b 100755--- a/resources/views/layouts/app.blade.php+++ b/resources/views/layouts/app.blade.php@@ -24,6 +24,7 @@window.addEventListener('resize', setVhUnit)</script>+ <link rel="manifest" href="/manifest.json"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>diff --git a/routes/web.php b/routes/web.phpindex fdfb366a..eb88c8f7 100755--- a/routes/web.php+++ b/routes/web.php@@ -54,6 +54,18 @@ Route::middleware('web')->group(function () {abort(403);});+ Route::get('/manifest.json', function () {+ $path = public_path('manifest.json');++ if (! file_exists($path)) {+ abort(404);+ }++ return response()->file($path, [+ 'Content-Type' => 'application/json',+ ]);+ });+// Root directoryRoute::get('/', function () {if (Auth::user()) {