Does the local localhost8081 port access port 8080 count as cross-domain? how to access port 404 after configuring nginx?

is it wrong that html,ajax at local port 8081 submits a post request to port 8080, and then nginx intercepts the url, at the beginning of demo and forwards it to localhost8080,?

server {

     listen       8081;
     server_name  localhost;

     location /demo/{
         proxy_pass  http://localhost:8080/demo/;
     }
 }
Mar.21,2021

it should be no problem to configure to write this way to see if the connection you requested by ajax is wrong

Menu