CodeIgniter4
CodeIgniter4 copied to clipboard
Bug: route with "/" respond in any method [GET, POST, PUT, etc]
PHP Version
8.3
CodeIgniter4 Version
4.5.5
CodeIgniter4 Installation Method
Manual (zip or tar.gz)
Which operating systems have you tested for this bug?
Linux
Which server did you use?
fpm-fcgi
Database
MariaDB
What happened?
Hi,
I've these routes:
In postman if i execute:
GET --> /api/devices --> Respond OK POST --> /api/devices --> Respond OK DELETE --> /api/devices --> Respond ERROR (it's normal not exists route)
but if i execute with and slash "/" at the end, all routes respond as if they were GET.
GET --> /api/devices/ --> Respond OK POST --> /api/devices/ --> Respond OK DELETE --> /api/devices/ --> Respond OK
and I can't find where the problem is
Steps to Reproduce
Make a postman call with adding a slash to the end
Expected Output
Same answer whether it has a slash or not
Anything else?
No response