diff --git a/routes/web.php b/routes/web.php index 80b72da6a70df17be405606780c4ca64c1db1f14..22c13e075eb03beb30acb2593c0d011262fe6416 100644 --- a/routes/web.php +++ b/routes/web.php @@ -180,6 +180,16 @@ Route::group( $filePath = storage_path() . "/app/public/MetaGer-release.apk"; return response()->download($filePath, "MetaGer-release.apk"); }); + Route::get('maps', function () { + $filePath = env('maps_app'); + $fileContents = file_get_contents($filePath); + return response($fileContents, 200) + ->header('Cache-Control', 'public') + ->header('Content-Type', 'application/vnd.android.package-archive') + ->header('Content-Transfer-Encoding', 'Binary') + ->header("Content-Disposition", "attachment; filename=app-release.apk"); + }); + Route::get('maps/version', function () { $filePath = env('maps_version'); $fileContents = file_get_contents($filePath);