Is there a way to add/remove server entries dynamically to http-proxy ? #413

chiragsanghvi opened this Issue May 1, 2013 · 3 comments


None yet

4 participants


Used and played around with http-proxy,good for use.

We've a requirement in our project, where we need to scale/add node servers depending on load/traffic.Is there a way to add an entry to list of servers in http-proxy dynamically ?

gisripa commented Sep 20, 2013

@chiragsanghvi If you are talking about updating the routes dynamically after starting the proxy server, it can be achieved by adding routes as a json file. http-proxy listens to the file changes and updates the routes.

var options   = { router: 'routes.json' };


Contents of routes.json will be

"router": {
    "": "",
    "": "",
    "": ''
fonini commented Jan 9, 2014

Actually, the contents of routes.json will be:

{ "router" : {
    "" : "",
    "" : "",
    "" : ''
jcrugzz commented Jan 20, 2016

This is referencing an old version of http-proxy but if you come across this issue we have a new module that handles routing and this sounds like a feature that could be requested if needed. http-proxy-rules

@jcrugzz jcrugzz closed this Jan 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment