question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add more options for proxy context

See original GitHub issue

What 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:open
  • Created 5 years ago
  • Reactions:5
  • Comments:16

github_iconTop GitHub Comments

12reactions
aldencoleraincommented, Sep 13, 2018

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.

8reactions
FFGFcommented, Nov 16, 2018

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/’ } } }

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found