Can I protect a specific route?

Hello! I want to protect a specific route. Is posible? For example, /products. Some suggestion?


Yes, you would add a middleware to that route.

Hi @tflight ! Thanks for your comment!

In my case I implemented Slim CSRF and I want to protect the route that generate a security token. I don’t know if the correct way…


/generateToken (the access should be protected)

/products (checks a security token)

In conclusion, I want to protect my api… Some suggestion?

1 Like