Skip to content
Snippets Groups Projects
Commit ff9f3541 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

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
No related branches found
No related tags found
2 merge requests!1588Development,!1584Resolve "Gitlab sets wrong content type for apk files"
......@@ -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 () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment