J
J
jenya77712021-10-30 17:50:10
React
jenya7771, 2021-10-30 17:50:10

How to properly divide an application into a user part and an admin part in React?

Hello everyone, how to correctly divide the application into the user part and the admin part in React, so that ordinary users would not be able to dig into the source code to find out the admin API urls, and what data should be sent according to these urls. Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2021-10-30
@Aetae

Divide into two webpack entry points, and close the admin one on the server.
Only it's still security through obscurity. Security should be done by access control systems and roles, not by the hope that your API won't be found.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question