The vue project solves cross-domain problems and cross-domain requests between different domain names under linux

For cross domain requests between different domain names

insert image description here

need:

Now there are two projects: Project A and Project B. The projects go online and occupy domain names (A.test.com and B.test.com) respectively. Project A is a front-end and back-end separation project. The front-end of A calls the back-end project of A, using the same For the domain name (A.test.com), it is no problem to use general cross-domain.
The B project only has the front end, and also calls the back end interface of the A project. How does the front end of project B perform cross-domain?
The following is the logic diagram.
insert image description here
insert image description here
If it is a development environment target, it can still be written as http://localhost:9090 (the port number depends on the specific situation).

Guess you like

Origin blog.csdn.net/qq_43813351/article/details/128613169