- previously co-debugged with the backend, and worked as an agent locally to solve the cross-domain problem. Now you need to put it on the service to find that it failed to send. The request sent also comes with the API field of the agent .
- configure as follows
proxyTable: {
"/api": {
// target: "",
target: "xxx,xxx,xxx,xxx",
changeOrigin: true,
pathRewrite: {
"^/api": ""
}
}
},
because of the joint call with two backends, it is not mandatory to add a fixed proxy to all requests, so the URL of the request is written like this
let url = "/api/FileStation"; 1
let url = "/api2/FileStation"; 2
I tried to set target: to an empty string in the configuration, thinking that this would allow
"/api/FileStation" =>"/FileStation"
the actual release is not good, please ask Daniel to guide you how to do it.