From 819a44c6641788dacc5648930a26d97d158d65bf Mon Sep 17 00:00:00 2001 From: Dominik Pfennig <dominik@suma-ev.de> Date: Sat, 20 Jan 2018 09:40:50 +0100 Subject: [PATCH] Update web.php --- routes/web.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/routes/web.php b/routes/web.php index 80b72da6a..22c13e075 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); -- GitLab