how to block app access without login |
is there a way to prevent users to access any url " except login and sign up "
as we can use App\Config\Filters.php as below (per my CI 4 course video till this question), it is a specific url to block and i can mention here in array multiples entries to block but is there a way to block all except above mentioned easy way (do not want to enter all one by one in the below list - if possible). may be, my questions irritate but as metnioned i am very new to CI and my previous experience is not for a real web application development like CodeIgniter, so please, pardon me. Code: public $filters = [ regards (04-22-2022, 01:11 AM)Ahmed Haroon Wrote: is there a way to prevent users to access any url " except login and sign up " can you please read here carefully https://codeigniter.com/user_guide/incom...ght=filter Codeigniter First, Codeigniter Then You!!
yekrinaDigitals
thanks @luckmoshy for great help.
Quote:There are times where you want to apply a filter to almost every request, but have a few that should be left alone. One common example is if you need to exclude a few URI’s from the CSRF protection filter to allow requests from third-party websites to hit one or two specific URI’s, while keeping the rest of them protected. To do this, add an array with the ‘except’ key and a URI to match as the value alongside the alias: Code: public $globals = [ Newbie here in CodeIgniter World !! Please appologize if any nonsense from me.
environment: Windows 10, XAMPP 3.3.0, VS Code, SQLyog Community Ed.
[quote="Ahmed Haroon" pid="395687" dateline="1650622914"]
thanks @luckmoshy for great help. [quote] There are times where you want to apply a filter to almost every request, but have a few that should be left alone. One common example is if you need to exclude a few URI’s from the CSRF protection filter to allow requests from third-party websites to hit one or two specific URI’s, while keeping the rest of them protected. To do this, add an array with the ‘except’ key and a URI to match as the value alongside the alias: [/quote] Code: public $globals = [ [/php] PHP Code: public $aliases = [ otherwise, if you are a newbie I will direct a nice tutorial https://onlinewebtutorblog.com/work-with...-tutorial/ Codeigniter First, Codeigniter Then You!!
yekrinaDigitals
|
Welcome Guest, Not a member yet? Register Sign In |