Browse Source

feat: Merge pull request #1105 from pelias/attribution_url

fix attribution link
pull/1106/head
Julian Simioni 7 years ago committed by GitHub
parent
commit
79e41c5c14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      middleware/geocodeJSON.js

6
middleware/geocodeJSON.js

@ -47,7 +47,11 @@ 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.resolve(opts.config.host, opts.basePath + 'attribution');
res.body.geocoding.attribution = url.format({
protocol: req.protocol,
host: req.get('host'),
pathname: opts.basePath + 'attribution'
});
// OPTIONAL. Default: null. The query that has been issued to trigger the
// search.

Loading…
Cancel
Save