Skip to content

Dev server proxy context do not work with the glob syntax #2947

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dousybox opened this issue Nov 13, 2018 · 1 comment
Closed

Dev server proxy context do not work with the glob syntax #2947

dousybox opened this issue Nov 13, 2018 · 1 comment

Comments

@dousybox
Copy link

Version

3.1.1

Reproduction link

https://github.com/DousyBox/vue-multipages

Node and OS info

Node 8.11.4 / npm 5.6.0 / Windows 10

Steps to reproduce

with default settings, run command blow:

npm install
npm run serve

It will open the default browser automatically, and then you can get the error message in browser.

What is expected?

Pass the request to pathRewrite, and redirect the request.

What is actually happening?

Can not match the request url, and got an error


Please forgive me for bad English, a supplementary explanation is below:

I written a local mock server with the webpack-dev-server built-in proxy. and it work very well.

It just match the request url like "/mock/**/*.json", and redirect to the local server and load the matched json file in {workspace}/static/mock .

I use glob sntax to write the proxy context, I find this syntax is working in http-proxy-middleware.

It works in the webpack-dev-server too, but when I use Vue Cli 3 to do this things, I got an error.

Please help me to fix this issue, or can give me anyother way to make it works.

Thank you very much.

@dousybox
Copy link
Author

Same problem with #2868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant