What are your ways of securing a Express.js REST API?
问题 I'm building an app with an Express.js REST API as the back-end and I'm trying to wrap my head around all the necessary security measures and which libraries and tools to use. Could you guys and gals make a rundown of what your favorite and secure libraries you use for each part of the securing process are? Maybe also write why you use the ones you use. It would really help me a lot. Thank you in advance. 回答1: You should use CORS to prevent access to your API from unwanted origins (domain,