encountered a cross-domain problem, because the front end needs to obtain data from multiple servers, and it is a bit troublesome for the back end to obtain data and provide an interface to the front end. So I wonder if the front end can directly obtain the data of other websites.
for example, if this website is A, if you want to request the data of the three websites, can you send our request to the server automatically through a transit proxy server, and return the results automatically when you get the response?
take a look at the reverse proxy of Nginx. The current configuration
server {
listen 8000;
server_name localhost;
location / {
proxy_pass http://localhost:3000;
}
}
this configuration only allows A to access Nginx
just as it does to B, but what about other CMI D servers? Can I configure URL to add a parameter to represent the domain name, and then Nginx
automatically replace the domain name in the parameter?
but I still don"t know what to do. Is there a good solution? (v ^ _ ^) v