How to solve the problem of cross domain redirection with parameters? Do not use stitching parameters at the end of the redirection URL
Requirement: project a is on server a, and it needs to be redirected to project B on server B, and it needs to carry parameters, which are not visible to users, so you can't splice parameters behind the redirection URL. Do you have any other solutions?
The project uses spring
RedirectAttributes.addFlashAttribute No, it can only redirect between controllers in the same project.
This problem has not been solved. Please give me a reply.
Supplementary questions: (1) you can put the data in the request header in the downstairs answer, but the server of the opposite party needs to set the custom field of allowing the request header
How to understand this? How to realize it?
The browser requests server a (not Ajax request), and server a returns 302 response and redirection URL to redirect the client. At this time, server a can put the parameters to be passed into the response header, and then the browser redirects the target URL, but it will not carry the previous redirection response header information at this time
How can he carry it?
(2) Second, the server returns a 302 redirection response. Can the response contain a response body message???
Because what I tested is to use response to write data, but the browser side can't see the redirection response data. How can I control this in implementation? Do all redirection responses contain no response body?