koopjs / FeatureServer

An open source Geoservices Implementation (deprecated)
https://geoservices.github.io
Other
101 stars 32 forks source link

Add ability to set version from app.locals #230

Closed rgwozdz closed 2 years ago

rgwozdz commented 2 years ago

Currently, the feature-server version reported by the service and layer metadata routes is hardcoded (10.51, 10.5.1). This PR allows the version to be set dynamically by passing in configuration via the Express req.app.locals. If the Express implementation (e.g. Koop instance) sets the following:

koop.server.locals.config = {
  featureServer: {
    currentVersion: 10.81,
    fullVersion: '10.8.1'
  }
}

the service and layer metadata response will return the set values.