Browse Source

Use legacy url from peliasConfig

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

4
routes/legacy.js

@ -1,12 +1,12 @@
var proxy = require('express-http-proxy'); var proxy = require('express-http-proxy');
var sendToLegacy = proxy('pelias.mapzen.com', { function addRoutes(app, peliasConfig) {
var sendToLegacy = proxy(peliasConfig.legacyUrl, {
forwardPath: function(req, res) { forwardPath: function(req, res) {
return require('url').parse(req.url).path; return require('url').parse(req.url).path;
} }
}); });
function addRoutes(app) {
// api root // api root
app.get( '/', sendToLegacy ); app.get( '/', sendToLegacy );

Loading…
Cancel
Save