How to hide .env passwords in Laravel whoops output?

后端 未结 10 1672
攒了一身酷
攒了一身酷 2020-12-07 10:48

How can I hide my passwords and other sensitive environment variables on-screen in Laravel\'s whoops output?

Sometimes other people are looking at my development wor

10条回答
  •  余生分开走
    2020-12-07 11:04

    I've made a package to solve this problem.

    Just install it using

    composer require glaivepro/hidevara
    

    Most of the server and all the env variables will be removed. Any password-like fields in $_POST will have their values hidden.

    You can also customize it in either blacklist or whitelist approach to show/obfuscate/remove fields however you like.

提交回复
热议问题