TxThinkingInc / brook-user-system

A sample implementation of [Brook User System](https://github.com/txthinking/brook/blob/master/protocol/user.md)
MIT License
7 stars 2 forks source link

how can i run just user api without activate web page ui #3

Open nofinori opened 1 month ago

nofinori commented 1 month ago

hi i wrote code for manage users and i want have userapi without exist a web page like this https://yourdomain.com/admin/ for many reason include security reason i don't want exist that page how can i run userapi without that page or remove it completely ? i used this command for active my user api link joker nico domain.com http://127.0.0.1:24402

txthinking commented 1 month ago

If your brook server and userapi run on same machine. You can let brook server and userapi communicate through 127.0.0.1:24402. This will not expose port 24402 to the pubic.

If your brook server and userapi run on same subnet. You can let brook server and userapi communicate through such as 10.1.1.1:24402. This will not expose port 24402 to the public.

If your brook server and userapi must communicate through public network. You can set firewall on userapi machine to only allow brook server ip access port 24402.

If you only care about 'web page', just remove it https://github.com/TxThinkingInc/brook-user-system/blob/master/main.js#L45-L67 and https://github.com/TxThinkingInc/brook-user-system/blob/master/main.js#L82-L326