G
G
ganbatte2020-09-13 11:51:54
HTTP Cookies
ganbatte, 2020-09-13 11:51:54

The server is located remotely, the client is done in the local machine, authorization by cookies, how to combine?

It is difficult to deploy a test server locally for a client-side developer, since he needs help to raise this server, there is still a lot to raise. But I shared my server in the Internet. Named it roughly.
projectName.host.ru
He has access to this page.
He develops with react.
After npm run start command. The client starts on
localhost:3000
AND makes all requests to the server via ajax. But since authorization by cookies, authorization is not saved.

It is necessary to start the client locally at the address.
projectName.host.ru:3000
and requests went to a remote server.
projectName.host.ru
How can I do that ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2020-09-13
@dimonchik2013

It is necessary to start the client locally at the address.
projectName.host.ru:3000
and requests went to the remote server.
projectName.host.ru

no way, except that on the firewall, packets on the port are shot to another IP, that you can’t do it,
look like adults usually do this,
but it’s done without being tied to a domain - on a local domain or even a localhost,
say also that in the app it will hardcode the domain, idiocy same

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question