Skip to content
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

Bug: route with "/" respond in any method [GET, POST, PUT, etc] #9217

Open
nicojmb opened this issue Oct 7, 2024 · 0 comments
Open

Bug: route with "/" respond in any method [GET, POST, PUT, etc] #9217

nicojmb opened this issue Oct 7, 2024 · 0 comments
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@nicojmb
Copy link

nicojmb commented Oct 7, 2024

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:
image

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)

image

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

image

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

@nicojmb nicojmb added the bug Verified issues on the current code behavior or pull requests that will fix them label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

No branches or pull requests

1 participant