Nuxt implements proxy proxy to solve cross-domain problems in the development process

the company recently used nuxt framework for development, and now the redevelopment process has encountered cross-domain problems. In the past, vue projects only need to simply set up proxy to realize cross-domain requests to solve cross-domain problems in development through proxy. There are many ways to solve cross-domain problems in development, but they have not been successful. Please give us some advice from bosses who have had similar experiences. Thank you very much!

Mar.20,2021

Boss ~ have you solved this problem


are you talking about ajax cross-domain?

ajax cross-domain needs back-end support, no matter what the framework, the principle is the same: the request header issued by the front end is guaranteed to have Origin.

the backend service should ensure that the Access-Control-Allow-Origin whitelist is set. If the Origin information is on your back-end whitelist, you can cross-domain. Cross-domain knowledge can be searched: CORS

Menu