Permalink
Browse files

Copy backendUrl property

  • Loading branch information...
1 parent dffa5c6 commit acf072535d42f8f8e3d2046b53bcc1cceae357b0 @ithinkihaveacat committed Mar 13, 2013
Showing with 2 additions and 1 deletion.
  1. +1 −1 examples/reverse-proxy.js
  2. +1 −0 lib/fishback.js
View
2 examples/reverse-proxy.js
@@ -14,7 +14,7 @@ client.on('newRequest', function (req) {
console.info("CLIENT.newRequest " + req.method + " " + req.url);
});
client.on('newResponse', function (res) {
- console.info("CLIENT.newResponse " + res.method + " " + res.localUrl);
+ console.info("CLIENT.newResponse " + res.method + " " + res.backendUrl);
});
var proxy = fishback.createProxy(client);
View
1 lib/fishback.js
@@ -59,6 +59,7 @@ function proxyRequest(serverRequest, clientRequest) {
function proxyResponse(clientResponse, serverResponse) {
serverResponse.url = clientResponse.url;
+ serverResponse.backendUrl = clientResponse.backendUrl;
serverResponse.method = clientResponse.method;
// Avoid writeHead() to give listeners a change to modify the serverResponse
serverResponse.statusCode = clientResponse.statusCode;

0 comments on commit acf0725

Please sign in to comment.