@talelmishali use the middleware auth to make sure everyone accessing it is your app users
Dec 27, 2020
5
Level 16
API visible to users?
Hello, I have an API route that simply returns a JSON with the product's information from the database, I use the route to for an Axios get request to push into a vue data.
When visiting the API address I can see the JSON response, how should I go about protecting it? I'm not sure I want it visible to users.
How do you usually protect your own API routes to use only from the server requests?
Please or to participate in this conversation.