Browse Source

Merge pull request #1149 from pelias/attribution

Fix attribution URL settings
disable-dfs_query_then_fetch
Julian Simioni 7 years ago committed by GitHub
parent
commit
dc2662659b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      middleware/geocodeJSON.js

4
middleware/geocodeJSON.js

@ -47,10 +47,10 @@ function convertToGeocodeJSON(req, res, next, opts) {
// OPTIONAL. Default: null. The attribution of the data. In case of multiple sources,
// and then multiple attributions, can be an object with one key by source.
// Can be a URI on the server, which outlines attribution details.
res.body.geocoding.attribution = url.format({
res.body.geocoding.attribution = opts.config.attributionURL || url.format({
protocol: req.protocol,
host: req.get('host'),
pathname: opts.basePath + 'attribution'
pathname: 'attribution'
});
// OPTIONAL. Default: null. The query that has been issued to trigger the

Loading…
Cancel
Save