use webpack to open the front page on the local localhost:8080
port
proxy is configured like this:
devServer: {
port: 8080,
contentBase: "./dist",
proxy: {
"/abc": {
target: "http://122.79.10.259:8080"
}
}
},
the code that uses the ajax request on the page looks like this:
$.ajax({
url: "/abc/signup/video",
type: "get"
}).done(res => {
}).fail(err => {
})
at this point, the browser still asks for http://localhost:8080/abc/signup/video
, instead of http://122.79.10.259:8080/abc/signup/video
, ask the gods to help solve the problem.