0

Im using deployd js (http://deployd.com) as my backend api. I have created user collection and deployd automatically create REST API for me. I can access my user collection by http://localhost:8080/users URL. It returns all users as a JSON array.

Here you can find more about how to use user collection in deployd http://docs.deployd.com/docs/users/creating-user-collections.html

Now I need to deny access this route to the outside or hide sensitive information. Because anyone can simply get all users in my application (without their password) by accessing this REST route. Anyone can get all users username, email, role ect.

Nuwan.Niroshana
  • 407
  • 4
  • 15

1 Answers1

0

add this to onGet event

cancel("Forbidden access!", 403);

no one will be able to query the /users anymore

dev-gaek
  • 23
  • 2
  • 6