Skip to content

custom logic for node-http-proxy to proxy basedon incoming url

Notifications You must be signed in to change notification settings

desaintmartin/proxy-by-url

This branch is 7 commits ahead of, 8 commits behind dominictarr/proxy-by-url:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

59fcb11 · Mar 21, 2012

History

10 Commits
Jul 30, 2011
Mar 21, 2012
Jul 30, 2011
Jul 30, 2011

Repository files navigation

#proxy by url

this is a simple example of a node-http-middleware that will proxy based on the incoming url. say you want to proxy every request thing under /database to localhost:5984 (couchbd) (and remove the /database prefix)

this is how:

require('http-proxy').createServer(
  require('proxy-by-url')({
    '/database': { port: 5984, host: 'localhost' },
  })
).listen(8000)

About

custom logic for node-http-proxy to proxy basedon incoming url

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%