mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-09-01 17:55:10 +00:00
mediocre routing for new domains
This commit is contained in:
parent
2925750ea1
commit
7f4a8178e0
2 changed files with 8 additions and 5 deletions
|
@ -79,11 +79,6 @@ class Controller
|
||||||
|
|
||||||
$router->get(['/', 'home'], 'ContentActions::executeHome');
|
$router->get(['/', 'home'], 'ContentActions::executeHome');
|
||||||
|
|
||||||
//
|
|
||||||
$router->get('/org', 'ContentActions::executeOrg');
|
|
||||||
$router->get('/tv', 'ContentActions::executeTv');
|
|
||||||
//
|
|
||||||
|
|
||||||
$router->get(['/get', 'get'], 'DownloadActions::executeGet');
|
$router->get(['/get', 'get'], 'DownloadActions::executeGet');
|
||||||
$router->get(['/getrubin', 'getrubin'], 'DownloadActions::executeGet');
|
$router->get(['/getrubin', 'getrubin'], 'DownloadActions::executeGet');
|
||||||
foreach (array_keys(OS::getAll()) as $os) {
|
foreach (array_keys(OS::getAll()) as $os) {
|
||||||
|
|
|
@ -29,6 +29,14 @@ class ContentActions extends Actions
|
||||||
public static function executeHome(): array
|
public static function executeHome(): array
|
||||||
{
|
{
|
||||||
Response::enableHttpCache();
|
Response::enableHttpCache();
|
||||||
|
|
||||||
|
$serverName = Request::getServerName();
|
||||||
|
if ($serverName === 'lbry.org') {
|
||||||
|
return static::executeOrg();
|
||||||
|
} else if ($serverName === 'lbry.tv') {
|
||||||
|
return static::executeTv();
|
||||||
|
}
|
||||||
|
|
||||||
return ['page/home'];
|
return ['page/home'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue