@@ -32,6 +32,9 @@ var defaultOptions = {
3232 "bar.com" : "127.0.0.1:8092" ,
3333 "baz.com/taco" : "127.0.0.1:8098" ,
3434 "pizza.com/taco/muffins" : "127.0.0.1:8099" ,
35+ "blah.com/me" : "127.0.0.1:8088/remapped" ,
36+ "bleh.com/remap/this" : "127.0.0.1:8087/remap/remapped" ,
37+ "test.com/double/tap" : "127.0.0.1:8086/remap" ,
3538 }
3639} ;
3740
@@ -53,7 +56,10 @@ vows.describe('node-http-proxy/routing-proxy/' + testName).addBatch({
5356 "an incoming request to foo.com" : runner . assertProxied ( 'foo.com' , 8090 , 8091 ) ,
5457 "an incoming request to bar.com" : runner . assertProxied ( 'bar.com' , 8090 , 8092 ) ,
5558 "an incoming request to baz.com/taco" : runner . assertProxied ( 'baz.com' , 8090 , 8098 , "/taco" , "/" ) ,
56- "an incoming request to pizza.com/taco/muffins" : runner . assertProxied ( 'pizza.com' , 8090 , 8099 , "/taco/muffins" , "/taco" ) ,
59+ "an incoming request to pizza.com/taco/muffins" : runner . assertProxied ( 'pizza.com' , 8090 , 8099 , "/taco/muffins" , "/" ) ,
60+ "an incoming request to blah.com/me/fun" : runner . assertProxied ( 'blah.com' , 8090 , 8088 , "/me/fun" , "/remapped/fun" ) ,
61+ "an incoming request to bleh.com/remap/this" : runner . assertProxied ( 'bleh.com' , 8090 , 8087 , "/remap/this" , "/remap/remapped" ) ,
62+ "an incoming request to test.com/double/tap/double/tap" : runner . assertProxied ( 'test.com' , 8090 , 8086 , "/double/tap/double/tap" , "/remap/double/tap" ) ,
5763 "an incoming request to unknown.com" : runner . assertResponseCode ( 8090 , 404 )
5864 } ,
5965 "and routing by Hostname" : {
0 commit comments