๐ | Restrict route by IP | Route allowed without specified parameter is blocked when a parameter is passed in the url
๐บ๐ธUnited States tyfoo
Yeah, the MR does work for my case. I wonder about the logic still, though. If a user specifies params, they probably want to make sure the request params match right?
!$params || !$query_string
would work for cases where no params were specified, but also where params were specified but no query string is present.
What do you think? I could see the argument either way, really.
๐ | Restrict route by IP | Route allowed without specified parameter is blocked when a parameter is passed in the url
๐บ๐ธUnited States tyfoo
I just bumped into this issue as well. At least for me, leaving the params option empty should mean that we don't care about matching the query string.
So instead of
if (!$params && !$query_string) {
...
}
We could just have
if (empty($params)) {
...
}
What do you think?