-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #358 from viralsolani/develop
Merge Develop branch
- Loading branch information
Showing
61 changed files
with
8,393 additions
and
3,006 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?php | ||
|
||
namespace App\Providers; | ||
|
||
use Illuminate\Support\Facades\Gate; | ||
use Laravel\Telescope\IncomingEntry; | ||
use Laravel\Telescope\Telescope; | ||
use Laravel\Telescope\TelescopeApplicationServiceProvider; | ||
|
||
class TelescopeServiceProvider extends TelescopeApplicationServiceProvider | ||
{ | ||
/** | ||
* Register any application services. | ||
* | ||
* @return void | ||
*/ | ||
public function register() | ||
{ | ||
// Telescope::night(); | ||
|
||
$this->hideSensitiveRequestDetails(); | ||
|
||
Telescope::filter(function (IncomingEntry $entry) { | ||
if ($this->app->isLocal()) { | ||
return true; | ||
} | ||
|
||
return $entry->isReportableException() || | ||
$entry->isFailedJob() || | ||
$entry->isScheduledTask() || | ||
$entry->hasMonitoredTag(); | ||
}); | ||
} | ||
|
||
/** | ||
* Prevent sensitive request details from being logged by Telescope. | ||
* | ||
* @return void | ||
*/ | ||
protected function hideSensitiveRequestDetails() | ||
{ | ||
if ($this->app->isLocal()) { | ||
return; | ||
} | ||
|
||
Telescope::hideRequestParameters(['_token']); | ||
|
||
Telescope::hideRequestHeaders([ | ||
'cookie', | ||
'x-csrf-token', | ||
'x-xsrf-token', | ||
]); | ||
} | ||
|
||
/** | ||
* Register the Telescope gate. | ||
* | ||
* This gate determines who can access Telescope in non-local environments. | ||
* | ||
* @return void | ||
*/ | ||
protected function gate() | ||
{ | ||
Gate::define('viewTelescope', function ($user) { | ||
return in_array($user->email, [ | ||
// | ||
]); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.