mediocre routing for new domains

This commit is contained in:
Jeremy Kauffman 2019-02-03 14:54:28 -05:00
parent 2925750ea1
commit 7f4a8178e0
2 changed files with 8 additions and 5 deletions

View file

@ -79,11 +79,6 @@ class Controller
$router->get(['/', 'home'], 'ContentActions::executeHome');
//
$router->get('/org', 'ContentActions::executeOrg');
$router->get('/tv', 'ContentActions::executeTv');
//
$router->get(['/get', 'get'], 'DownloadActions::executeGet');
$router->get(['/getrubin', 'getrubin'], 'DownloadActions::executeGet');
foreach (array_keys(OS::getAll()) as $os) {

View file

@ -29,6 +29,14 @@ class ContentActions extends Actions
public static function executeHome(): array
{
Response::enableHttpCache();
$serverName = Request::getServerName();
if ($serverName === 'lbry.org') {
return static::executeOrg();
} else if ($serverName === 'lbry.tv') {
return static::executeTv();
}
return ['page/home'];
}