Filter Customization for disallowed characters |
Hello everyone. There was a problem with customizing the filter for disallowed characters. If I understand correctly, the exception is triggered before the standard filters are applied.
PHP Code: public function before(RequestInterface $request, $arguments = null) in App/Config/Filters PHP Code: public array $globals = [ The code of my filter is shown below. How to solve this problem correctly without violating the logic of the framework?
Not sure what your trying to do here, but the permitted chars are checked for in the Router.php file.
system/Router/Router.php Look at the __constructor. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(07-13-2024, 03:20 AM)InsiteFX Wrote: Not sure what your trying to do here, but the permitted chars are checked for in the Router.php file. I'm trying to catch forbidden characters in the URL (for example mysite.com/привет ) and issue a 404 page , or if there was an api request , then the 404 header
First, allow all characters in the URL.
To be added to .env Сначала разрешите все символы в URL В .env добавить Code: app.permittedURIChars = |
Welcome Guest, Not a member yet? Register Sign In |