Dynamically generated manifest
This commit is contained in:
parent
0224cd25eb
commit
73e9d7a1cd
3 changed files with 31 additions and 24 deletions
30
routes.php
30
routes.php
|
|
@ -2,6 +2,7 @@
|
|||
/** @var \Bramus\Router\Router $router */
|
||||
|
||||
use App\Helpers\ErrorHandler;
|
||||
use App\Helpers\Misc;
|
||||
use App\Helpers\Wrappers;
|
||||
use App\Models\BaseTemplate;
|
||||
|
||||
|
|
@ -21,6 +22,35 @@ $router->get('/verify', function () {
|
|||
Wrappers::latte('verify', new BaseTemplate('verify'));
|
||||
});
|
||||
|
||||
$router->get('/manifest', function () {
|
||||
header('Content-Type: application/json');
|
||||
$data = [
|
||||
"name" => "ProxiTok",
|
||||
"short_name" => "ProxiTok",
|
||||
"description" => "Use TikTok with a privacy-friendly alternative frontend",
|
||||
"lang" => "en-US",
|
||||
"theme_color" => "#4040ff",
|
||||
"background_color" => "#ffffff",
|
||||
"display" => "standalone",
|
||||
"orientation" => "portrait-primary",
|
||||
"icons" => [
|
||||
[
|
||||
"src" => Misc::url('/android-chrome-192x192.png'),
|
||||
"sizes" => "192x192",
|
||||
"type" => "image/png"
|
||||
],
|
||||
[
|
||||
"src" => Misc::url('/android-chrome-512x512.png'),
|
||||
"sizes" => "512x512",
|
||||
"type" => "image/png"
|
||||
]
|
||||
],
|
||||
"start_url" => Misc::url('/'),
|
||||
"scope" => Misc::url('/')
|
||||
];
|
||||
echo json_encode($data, JSON_PRETTY_PRINT);
|
||||
});
|
||||
|
||||
$router->get('/stream', 'ProxyController@stream');
|
||||
$router->get('/download', 'ProxyController@download');
|
||||
$router->get('/redirect', 'RedirectController@redirect');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue