1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 00:05:29 +00:00

Update Discover, allow public discover access

This commit is contained in:
Daniel Supernault 2021-02-05 21:09:03 -07:00
parent 9fd90e174b
commit 1404ac6e6f
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 4 additions and 1 deletions

View file

@ -37,7 +37,7 @@ class DiscoverController extends Controller
public function home(Request $request)
{
abort_if(!Auth::check(), 403);
abort_if(!Auth::check() && config('instance.discover.public') == false, 403);
return view('discover.home');
}
@ -113,6 +113,8 @@ class DiscoverController extends Controller
public function trendingApi(Request $request)
{
abort_if(config('instance.discover.public') == false && !Auth::check(), 403);
$this->validate($request, [
'range' => 'nullable|string|in:daily,monthly'
]);

View file

@ -10,6 +10,7 @@ return [
],
'discover' => [
'public' => env('INSTANCE_DISCOVER_PUBLIC', false),
'loops' => [
'enabled' => env('EXP_LOOPS', false),
],