'use strict';

// Require modules
var url = require('url');

module.exports = function(req, res, services, proxy) {
  var target = url.parse(req.url);

  for (var i = 0, _len = services.length; i < _len; i++) {

    var service = services[i];

    if (target.pathname.indexOf(service.name) !== -1) {
      proxy.web(req, res, {target: 'http://' + service.host + ':' + service.port });
    }

  }
};

@@ -105,20 +105,29 @@
 s, proxy
+, options
 ) %7B%0A
-
   var ta
@@ -246,16 +246,227 @@
 es%5Bi%5D;%0A%0A
+    if (options.meta_target) %7B%0A%0A      if (target.path.indexOf(service.meta%5Boption.meta_target%5D)) %7B%0A        proxy.web(req, res, %7Btarget: 'http://' + service.host + ':' + service.port %7D);%0A      %7D%0A%0A    %7D else %7B%0A%0A  
     if (
@@ -509,24 +509,26 @@
 ) !== -1) %7B%0A
+  
       proxy.
@@ -596,24 +596,33 @@
 ce.port %7D);%0A
+      %7D%0A%0A
     %7D%0A%0A  %7D%0A%7D

add rule to comparte meta