Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Oct 7, 2020
1 parent 54da1c7 commit 18c475f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 5 additions & 1 deletion config/telescope.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

/*
|--------------------------------------------------------------------------
| Ignored Paths & Commands
| Allowed / Ignored Paths & Commands
|--------------------------------------------------------------------------
|
| The following array lists the URI paths and Artisan commands that will
Expand All @@ -106,6 +106,10 @@
|
*/

'only_paths' => [
// 'api/*'
],

'ignore_paths' => [
'nova-api*',
],
Expand Down
6 changes: 2 additions & 4 deletions src/Telescope.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,8 @@ protected static function handlingApprovedRequest($app)
return false;
}

// Prioritize only_allow_paths if any are specified
$onlyAllowed = config('telescope.only_allow_paths', []);
if (! empty($onlyAllowed)) {
return $app['request']->is($onlyAllowed);
if (! empty($only = config('telescope.only_paths', []))) {
return $app['request']->is($only);
}

return ! $app['request']->is(
Expand Down

0 comments on commit 18c475f

Please sign in to comment.