Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove the environment variables from Laravel Debug?

Tags:

php

laravel

I want to remove the environment variables, database details and the information showing on Laravel Debug.

like image 303
Rafat Hossain Avatar asked Oct 15 '25 07:10

Rafat Hossain


1 Answers

Go to config/app and add the following

 /**
 * Debug Blacklist
 */
'debug_blacklist' => [
    '_COOKIE' => array_keys($_COOKIE),
    '_SERVER' => array_keys($_SERVER),
    '_ENV' => array_keys($_ENV),        
],

it will replace all environment variables value with an asterisks (*******)

like image 188
Sodruldeen Mustapha Avatar answered Oct 17 '25 10:10

Sodruldeen Mustapha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!