javascript - node.js express framework needs to enter admin through adminlogin, otherwise it will not be able to access admin. How to write
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-06-10 09:48:29
0
1
611
  1. node.js express needs to enter admin through adminlogin, otherwise it will not be able to access admin. How to write to jump directly to the adminlogin page?

  2. Then there is another problem, that is, when entering /admin in the address bar, you must first jump to the /adminlogin page

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(1)
小葫芦

Check the cookie before admin routing. If there is a valid cookie, continue the access. If not, jump to adminlogin.

To handle cookies, you can use express-session This library supports Redis and MongoDB.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template