Background: the.net core
Front end: vue3
In centos nginx deployed in the following
The background browser can normal visit,
http://www.somehwhtj.com:8000/swagger/index.html
The front-end for vue3
The vue. Config.
in js
Proxy: {
'/API: {
Target: define APIURl,
//APIURI in SRC/utils/define defined js, provide
Here is http://www.somehwhtj.com:8000
ChangeOrigin: true,
PathRewrite: {
'^/API' : '
}
}
}
Forward interface
But the front in the browser login prompt: CORS erros
I copied out the address is this:
http://www.somehwhtj.com:8000/api/Common/Login/Login? N=1620373222
I copy this address into your browser to access, go to
https://localhost:5001/api/Common/Login/Login? N=1620373222
Seek solutions
The same project, deploy in IIS: no problem