How do I get the data that requires login authentication in the test environment locally?

the node service is opened at the front end. When calling interface an of the test environment, you can access it with localhost:3000/a, and then use the request of node to request the address of the test environment. Equivalent to being an agent

but you don"t have permission if you use login authentication.
you can generally set the cookie of header manually.
is there any other way?


if there is oauth and basic login authentication and token in the background, all you can do is write a public method and store it somewhere where the public method requests storage every time the interface is called, and set it to head, and then it doesn't exist. Then


node gets the response and takes out the cookie,. Set to the response requested by the client


now it is popular to separate front and back ends and rest stateless interfaces. If your system is also designed with this architecture, you can also use token to authenticate and keep the user status

.
Menu