diff --git a/routes/legacy.js b/routes/legacy.js index e810ad0e..00e859d8 100644 --- a/routes/legacy.js +++ b/routes/legacy.js @@ -1,6 +1,10 @@ var proxy = require('express-http-proxy'); function addRoutes(app, peliasConfig) { + if (!peliasConfig.hasOwnProperty('legacyUrl')) { + return; + } + var sendToLegacy = proxy(peliasConfig.legacyUrl, { forwardPath: function(req, res) { return require('url').parse(req.url).path;