Disable Debug Bar for certain controllers? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Disable Debug Bar for certain controllers? (/showthread.php?tid=83438) |
Disable Debug Bar for certain controllers? - jameslittle - 09-26-2022 Is there a way to disable the debug bar for certain controllers, or ideally for individual routes or functions within a controller? It's causing issues when I'm trying to return JSON responses through AJAX. Thanks! James RE: Disable Debug Bar for certain controllers? - iRedds - 09-26-2022 You can exclude filters for specific paths. https://codeigniter.com/user_guide/incoming/filters.html#globals On ajax requests, the response body is not modified in any way, so debugging the toolbar does not affect the response. |