Welcome Guest, Not a member yet? Register   Sign In
Debug is breaking my JSON... How to disable it from some methods ?
#3

I tried to do that... as stated in the userguide....

But it didn't work... I had to change the CI_DEBUG variable in Boot/development.php


PHP Code:
<?php namespace Config;

use 
CodeIgniter\Config\BaseConfig;

class 
Filters extends BaseConfig
{
    
// Makes reading things below nicer,
    // and simpler to change out script that's used.
    
public $aliases = [
        
'csrf'     => \CodeIgniter\Filters\CSRF::class,
        
//'toolbar'  => \CodeIgniter\Filters\DebugToolbar::class,
        
'honeypot' => \CodeIgniter\Filters\Honeypot::class,
    ];

    
// Always applied before every request
    
public $globals = [
        
'before' => [
            
//'honeypot'
            // 'csrf',
        
],
        
'after'  => [
            
//'toolbar',
            //'honeypot'
        
],
    ];

    
// Works on all of a particular HTTP method
    // (GET, POST, etc) as BEFORE filters only
    //     like: 'post' => ['CSRF', 'throttle'],
    
public $methods = [];

    
// List filter aliases and any before/after uri patterns
    // that they should run on, like:
    //    'isLoggedIn' => ['before' => ['account/*', 'profiles/*']],
    
public $filters = [];


PHP Code:
/*
  |--------------------------------------------------------------------------
  | DEBUG MODE
  |--------------------------------------------------------------------------
  | Debug mode is an experimental flag that can allow changes throughout
  | the system. This will control whether Kint is loaded, and a few other
  | items. It can always be used within your own application too.
 */

defined('CI_DEBUG') || define('CI_DEBUG'0); 
Reply


Messages In This Thread
RE: Debug is breaking my JSON... How to disable it from some methods ? - by Poetawd - 10-07-2019, 07:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB