-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter Config not quite working with Routes? #2037
Comments
This is asking for help, not filing a bug. For help, please use our forums. Luckily, one of your friends has already opened a thread there. |
This is showing you incorrect behaviour of a feature - exactly what I consider to be a bug. |
Right - but your initial post was "I'm not sure if this is a bug or if we're not doing it right." Which means you're asking for help. A bug report is "If I do X, then Y happens" and it should do "Z", with easily reproducible steps. Your post did reveal one bug with the login route which was fixed last night, but I was unable to replicate the primary thing you were asking for help on. See the forum for more details. |
@Pantoflarz Have you found a fix for this. I also checked the linked forum post didn't find a fix there either. |
It feels like there is very little proper documentation on these filters.
They are a very good addon, but a little clarification would be good.
We have a filter, sessioncheckGlobal which deals with making sure that a user is logged in prior to accessing a webpage. The config for this filter is the following:
Where 'website' is in the exception list, it doesn't work.
Neither does '' (a blank element) or '/' (which stops the filter running at all).
So I guess the first question is, how do you make a filter not run on the main page where the main page is configured as the default controller?
In our case, the default controller is app/Controllers/Website/Website.php and the App is configured to route in this way:
$routes->get('/', 'Website/Website::index');
Second question, why does the following config make logincheck run on /admin/login ?
More routes if it helps:
My understanding is that this filter should only run on website.com/login and not website.com/admin/login (if I wanted this behaviour, I should put "*/login" instead, right?)
Just in case it makes it any easier, our Controller structure:
Running CodeIgniter 4.0.0-beta.3
on PHP 7.3.5-1+ubuntu16.04.1+deb.sury.org+1
I know the way I've explained is very confusing but I've been sat looking at this all day and I'm going a bit crazy. Any better documentation or explanation would help, though I am not sure if its an issue with our configs or the actual framework.
Thanks
The text was updated successfully, but these errors were encountered: