| Total Complexity | 8 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class TelescopeServiceProvider extends TelescopeApplicationServiceProvider |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Register any application services. |
||
| 14 | * |
||
| 15 | * @return void |
||
| 16 | */ |
||
| 17 | public function register() |
||
| 32 | }); |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Prevent sensitive request details from being logged by Telescope. |
||
| 37 | * |
||
| 38 | * @return void |
||
| 39 | */ |
||
| 40 | protected function hideSensitiveRequestDetails() |
||
| 41 | { |
||
| 42 | if ($this->app->isLocal()) { |
||
| 43 | return; |
||
| 44 | } |
||
| 45 | |||
| 46 | Telescope::hideRequestParameters(['_token']); |
||
| 47 | |||
| 48 | Telescope::hideRequestHeaders([ |
||
| 49 | 'cookie', |
||
| 50 | 'x-csrf-token', |
||
| 51 | 'x-xsrf-token', |
||
| 52 | ]); |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Register the Telescope gate. |
||
| 57 | * |
||
| 58 | * This gate determines who can access Telescope in non-local environments. |
||
| 59 | * |
||
| 60 | * @return void |
||
| 61 | */ |
||
| 62 | protected function gate() |
||
| 66 | // |
||
| 67 | ]); |
||
| 71 |