Vue-cli sets cross-domain proxy online address report 404

  1. vue-cli sets cross-domain proxy, local access is normal, and the online address is 404. What is the reason for this?

Cross-domain proxy settings in vue-cli:

   

Mar.09,2021

the development environment can use the proxy because it starts the development server and can forward requests to the interface.
online is packaged as html deployment, and your static site will not forward requests. You can use nginx as an offline proxy


this is a cross-domain proxy in the development environment, and the online environment does not work. Can you use nginx, or background interface to set cors
clipboard.png


cross-domain? Direct axios

Menu