There is a problem with JS cross-domain request. Ask for advice.

  • in a project of doing local area network for cross-domain, I use axios to send http request. The URL of the request is "192.168.31.205 code" ,
    but what I get is "http://localhost/js_sdk/192.168.31.205/strack/Api/User/select" (the webstrom port has been set to 80), and naturally 404 not found is returned. ORZ
  • after query, it is found that the ajax request supports protocols such as http, https, etc., and I don"t know how to execute
  • in the local area network.
  • Please advise
Mar.22,2021

that was done by the browser because you didn't write the protocol, : / / 192.168.31.205/strack/Api/User/select .

Menu