[Vuejs]-Nginx config in virtual host have CORS problem

0👍

Finally, I found the solution by myself.

The CORS problem is preflight request which caused by Axios.

The preflight request conditions could see this.

Because the Axios default Content-Type was application/json , and it triggered the preflight request. Therefore, I shouldn’t to use Nginx proxy, the good solution was change the Content-Type of Axios.

Leave a comment