CodeIgniter Forums
using regex for method in csrf_exclude_uris - 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: using regex for method in csrf_exclude_uris (/showthread.php?tid=73669)



using regex for method in csrf_exclude_uris - biggunn - 05-20-2019

Is there a way to use regex in the csrf_exclude_uris array so that I only need to define the controller?
I know I can use regex for the end parameter like so:



Code:
controller/method-name/[0-9]+

But what I want is to just exclude the controller and any method like so:



Code:
controller/[a-z\-]+


or



Code:
controller/[a-z\-]+/[0-9]+


Haven't found any examples doing it anywhere and since it is not working, just wondering if anyone knows if it is actually possible, or if you see something wrong with what I am trying.
Thanks in advance.