CodeIgniter Forums
Overriding config.php ? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Overriding config.php ? (/thread-53346.html)



Overriding config.php ? - El Forum - 07-20-2012

[eluser]Unknown[/eluser]
This is my config.php file xss filtering setting.
Code:
$config['global_xss_filtering'] = TRUE;
I would like to change it on runtime as
Code:
$config['global_xss_filtering'] = FALSE;
This function is not working.
Code:
$this->config->set_item('global_xss_filtering', FALSE);
Is it possible? How?


Overriding config.php ? - El Forum - 07-20-2012

[eluser]Clooner[/eluser]
You will probably have to set the config item before you load the desired library. E.g. when the input library is loaded it sets its own xss flag and works according to that and not the config. Therefor overwrite the setting of the library or change the config setting before loading the library!