CodeIgniter Forums
Debug toolbar in filters? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31)
+--- Thread: Debug toolbar in filters? (/showthread.php?tid=86538)



Debug toolbar in filters? - iRedds - 01-31-2023

The toolbar is enabled in filters. But it seems to me that this is a bad decision.
If git and CI/CD are used, then, as it seems to me, it is necessary to turn off the toolbar every time before the commit so that it does not get into production.

Maybe it makes sense to move the inclusion of the toolbar to .env?
Accordingly, we need to change the toolbar injection in response.

For example, the CodeIgniter::sendResponse() method can check whether the toolbar is enabled or not, and inject data into the response. 
In this case, all calls to Response::send() must only be made through the CodeIgniter::sendResponse() method.

Maybe I'm wrong.