Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MetaGer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
MetaGer
Commits
ff9f3541
Commit
ff9f3541
authored
4 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Plain Diff
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
!1588
Development
,
!1584
Resolve "Gitlab sets wrong content type for apk files"
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
routes/web.php
+30
-2
30 additions, 2 deletions
routes/web.php
with
30 additions
and
2 deletions
routes/web.php
+
30
−
2
View file @
ff9f3541
...
...
@@ -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
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment