From 94faafc154bb5ec843cc3894cb1f3c388198f1f7 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Tue, 1 Sep 2015 14:56:14 -0400 Subject: [PATCH] Use legacy url from peliasConfig --- routes/legacy.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/routes/legacy.js b/routes/legacy.js index d7fbd0d2..e810ad0e 100644 --- a/routes/legacy.js +++ b/routes/legacy.js @@ -1,12 +1,12 @@ var proxy = require('express-http-proxy'); -var sendToLegacy = proxy('pelias.mapzen.com', { - forwardPath: function(req, res) { - return require('url').parse(req.url).path; - } -}); +function addRoutes(app, peliasConfig) { + var sendToLegacy = proxy(peliasConfig.legacyUrl, { + forwardPath: function(req, res) { + return require('url').parse(req.url).path; + } + }); -function addRoutes(app) { // api root app.get( '/', sendToLegacy );