Answer the question
In order to leave comments, you need to log in
How are unique links to the site generated if back and front work separately?
Good afternoon! Tell me please. There is a site whose back is implemented in go, and the front, which is made in vue, as single page applications. They work separately, that is, it is not a monolith. Previously, everything happened like this, the user pokes something and the front sends requests for the back, no more. Now the task has appeared that it is necessary to generate a unique link on which some action will take place, for example, a survey for a user who follows this link. In this regard, the question arose, since the front lives its own life, then the generation of these unique links should take place on it? Or on the back? If on the back, then I do not quite understand how this should happen. Earlier, when I worked with django, I imagined how it happens, we just make some kind of url, with a regular expression, and when the user clicks on such a link, Janga draws something for him. Perhaps, I guess that in the case of SPA, such routing is configured precisely at the front, and not through the back. Or you can generate the same on the back, but adjusting to the routing on the front, but I don’t know if this approach will be right. Is it so? Thank you.
Answer the question
In order to leave comments, you need to log in
You can generate a unique string on the backend and send the user a link to the frontend, in which this string will be as a parameter. When the user follows this link, this unique string will be extracted from it on the frontend and a request to the back will be sent with it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question