8000 GitHub - dominictarr/proxy-by-url: custom logic for node-http-proxy to proxy based on incoming url · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Oct 10, 2018. It is now read-only.
dominictarrPublic archive

About

custom logic for node-http-proxy to proxy based on incoming url

Resources

Stars

36 stars

Watchers

1 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

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 based on incoming url

Resources

Stars

36 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0