<?php
defined('BASEPATH') OR exit('No direct script access allowed');

/*
| -------------------------------------------------------------------------
| Hooks
| -------------------------------------------------------------------------
| This file lets you define "hooks" to extend CI without hacking the core
| files.  Please see the user guide for info:
|
|	https://codeigniter.com/userguide3/general/hooks.html
|
*/

// production code only. enable on production only.
// $hook['post_controller_constructor'] = array(
//     'class'    => 'PreConfig',
//     'function' => 'checkAccess',
//     'filename' => 'userAccess.php',
//     'filepath' => 'hooks'
// );

$hook['pre_system'][] = [
    'class'    => 'Cors',
    'function' => 'handle',
    'filename' => 'Cors.php',
    'filepath' => 'hooks',
    'params'   => []
];