Laravel Vapor - Fix error 404 files

This commit is contained in:
Dillon Ngo
2024-11-01 07:17:39 +08:00
parent 09d4f522ce
commit a531983070
+12
View File
@@ -37,6 +37,7 @@ use App\Classes\Modules\Transactions\Services\DeletesTransaction;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use App\Classes\General\AWSS3Helper;
use Illuminate\Support\Facades\File;
/*
|--------------------------------------------------------------------------
@@ -1253,3 +1254,14 @@ Route::get('/downloads', function () {
return view('pages.downloads.index');
})->name('admin.download');
Route::get('/site.webmanifest', function () {
$filePath = resource_path('assets/images/favicon/site.webmanifest');
if (!File::exists($filePath)) {
abort(404);
}
$contents = File::get($filePath);
return response($contents, 200)->header('Content-Type', 'application/manifest+json');
});