@@ -32,6 +32,9 @@ var defaultOptions = {
32
32
"bar.com" : "127.0.0.1:8092" ,
33
33
"baz.com/taco" : "127.0.0.1:8098" ,
34
34
"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" ,
35
38
}
36
39
} ;
37
40
@@ -53,7 +56,10 @@ vows.describe('node-http-proxy/routing-proxy/' + testName).addBatch({
53
56
"an incoming request to foo.com" : runner . assertProxied ( 'foo.com' , 8090 , 8091 ) ,
54
57
"an incoming request to bar.com" : runner . assertProxied ( 'bar.com' , 8090 , 8092 ) ,
55
58
"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" ) ,
57
63
"an incoming request to unknown.com" : runner . assertResponseCode ( 8090 , 404 )
58
64
} ,
59
65
"and routing by Hostname" : {
0 commit comments