The Vue project is placed on the online server, and the axios request address prompts net::ERR_CONNECTION_REFUSED.

Vueaxioshttp://locahost/...net::ERR_CONNECTION_REFUSED?
header("Access-Control-Allow-Origin:*")
Aug.16,2021
Has the

problem been solved? I have encountered the same problem


if it is a front-end separation project, it is recommended to check whether the request address of axios still requests localhost:

axios.defaults.baseURL = 'http://localhost:3000';

modify baseURL to backend address (if you have crossed domains)

Menu