Add more options for proxy context
See original GitHub issueWhat problem does this feature solve?
In the docs for devServer.proxy, you link to this documentation : https://github.com/chimurai/http-proxy-middleware#context-matching, which contains multiple options for context maching, like exculsion, wich, I think, would be nice to have !
What does the proposed API look like?
// vue.config.js
devServer: {
index: '',
proxy: {
'!\/dist\/*': {
target: 'http://127.0.0.1:8000'
}
}
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:16
Top Results From Across the Web
Configure device proxy and Internet connection settings
Configure the Microsoft Defender for Endpoint proxy and internet settings ... then it is recommended to add the additional registry setting ...
Read more >Set up a proxy server on the machine level
to run Internet Explorer in network service context. Open the Control Panel, and go to Internet Options > Connections > LAN settings. Click...
Read more >Proxying API Requests in Development - Create React App
"Invalid Host Header" Errors After Configuring Proxy. When you enable the proxy option, you opt into a more strict set of host checks....
Read more >How to configure a webpack proxy for multiple URLs efficiently?
Webpack dev server's proxy settings are a spin off of the ... coupled with the ability to define multiple proxy entries and context...
Read more >React — How To Proxy To Backend Server - Medium
We can implement this scenario with the setupProxy.js. I have added one more API with the context path api2 and we need to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I had a really hard time with the proxy settings, there are a number of bugs. Its also a bit confusing that the docs link to http-proxy-middleware but vue clie re-writes your options and they are subtly different. Maybe it just needs to be documented a little better but on first read it does seem like the proxy settings are 1 to 1 with the webpack proxy settings but they aren’t.
you can write as follow
devServer: { proxy: { ‘/getAbc|/getSde|/getCde’: { target: ‘http://127.0.0.1:3000/avc/’, }, ‘/initQwer’: { target: ‘http://127.0.0.1:3000/def’, }, ‘/getCvf’: { target: ‘http://127.0.0.1:3000/efd/’ } } }