diff options
| author | winter | 2024-12-31 22:30:16 +0000 |
|---|---|---|
| committer | winter | 2024-12-31 22:31:26 +0000 |
| commit | 4cd7017da9a37e5b9f38c3f50dd1c904ea41cbcb (patch) | |
| tree | d77f1fd223dae44f40b22c9810aeba238733310d /routes/homepage.php | |
| parent | 982e6213622bcb78a40d17f54cda27225a1d84b3 (diff) | |
implement user accounts and login
Diffstat (limited to 'routes/homepage.php')
| -rw-r--r-- | routes/homepage.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/homepage.php b/routes/homepage.php index c147d67..db8ea72 100644 --- a/routes/homepage.php +++ b/routes/homepage.php @@ -5,7 +5,8 @@ use Digitigrade\HttpResponseStatus\TemporaryRedirect; use Digitigrade\Router; Router::getInstance()->mount('/', function (array $args) { - if (str_contains($_SERVER['HTTP_ACCEPT'] ?? '', 'text/html')) { + $accept = $_SERVER['HTTP_ACCEPT'] ?? ''; + if (str_contains($accept, 'text/html') || str_contains($accept, '*/*')) { throw new TemporaryRedirect('/feed/global'); } throw new NotFound(); |
