[For personal use] VUE request interface error: net::ERR_CERT_COMMON_NAME_INVALID solution

1. Reasons for failure

1. Although it can be directly accessed through the domain name, in the front-end code, the interface does not use the domain name but the IP address

Two, the solution

1. Change the IP address in the front-end interface (I personally use axios) to a domain name, and the port remains unchanged.

(Before performing this step, please make sure that the SSL certificate has been deployed and the related configuration of Nginx has been completed)
insert image description here

Guess you like

Origin blog.csdn.net/qq_43768851/article/details/128562780