Browse Source

Use legacy url from peliasConfig

pull/213/head
Julian Simioni 9 years ago
parent
commit
94faafc154
  1. 12
      routes/legacy.js

12
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 );

Loading…
Cancel
Save