Laravel API Routes not found


I am trying to deploy laravel with nginx all my routes are working expect api routes i try to clear cache or api routes laravel cache but it didn’t work.

Can you please help me

Adding the answer here for posterity since it was also sent through our direct support channel.

We released an update to new Laravel apps a couple days ago to redirect forward slashes.

For laravel apps added prior to this update, you can update the site’s NGINX config with the following directive:

location ~ ^(.+)/$ {
      return 301 $scheme://$host$1;

This caused me many problems.
for example I can’t send a DELETE using a trailing slash.
Because it wants to redirect all the time causing CORS problems.

If you are going to put It should be optional. Not wearing it at all It took me hours to find out that it was from Nginx because I set up a new server so I thought it was from using each software version