nuxt-community / proxy-module

The one-liner node.js http-proxy middleware solution for Nuxt 2 using http-proxy-middleware
MIT License
408 stars 25 forks source link

Proxy not working if path is existing #101

Open julianklose opened 3 years ago

julianklose commented 3 years ago

I noticed, that the proxy is not working if the path is existing in the Nuxt project. During development it would be nice to have an option to overwrite this and proxy all configured requests. For example: I have some python scripts in the static folder that will be executed over CGI. The dev server just returns the content of the scripts. To prevent this I want to provide the CGI scripts by a different server and proxy the requests during development. In production the nuxt app and the CGI scripts will be provided by the same server. The only workaround I found to make this work is to temporarily rename the files in my static folder during development. It would be nice to have a "force" option to use the proxy even if the path exists.