Commit ff9f3541 authored by Dominik Hebeler's avatar Dominik Hebeler

Merge branch '963-gitlab-sets-wrong-content-type-for-apk-files' into 'development'

Resolve "Gitlab sets wrong content type for apk files"

Closes #963

See merge request !1584
parents 6d375506 eac67ae2
......@@ -222,10 +222,38 @@ Route::group(
->with('navbarFocus', 'dienste');
});
Route::get('metager', function () {
return redirect("https://gitlab.metager.de/open-source/app-en/raw/latest/app/release/app-release.apk?inline=false");
return response()->streamDownload(function () {
$fh = null;
try{
$fh = fopen("https://gitlab.metager.de/open-source/app-en/raw/latest/app/release/app-release.apk?inline=false", "r");
while (!feof($fh)) {
echo(fread($fh, 1024));
}
}catch(\Exception $e){
abort(404);
}finally {
if($fh != null){
fclose($fh);
}
}
}, 'MetaGerSearch.apk', ["Content-Type" => "application/vnd.android.package-archive"]);
});
Route::get('maps', function () {
return redirect("https://gitlab.metager.de/open-source/metager-maps-android/raw/latest/app/release/app-release.apk?inline=false");
return response()->streamDownload(function () {
$fh = null;
try{
$fh = fopen("https://gitlab.metager.de/open-source/metager-maps-android/raw/latest/app/release/app-release.apk?inline=false", "r");
while (!feof($fh)) {
echo(fread($fh, 1024));
}
}catch(\Exception $e){
abort(404);
}finally {
if($fh != null){
fclose($fh);
}
}
}, 'MetaGerMaps.apk', ["Content-Type" => "application/vnd.android.package-archive"]);
});
Route::get('maps/version', function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment