ajxchapman / ReServ

A set of simple servers (currently HTTP/HTTPS and DNS) which allow configurable and scriptable responses to network requests.
59 stars 6 forks source link

Allow routes to override variables taken from `config.json` #16

Open ajxchapman opened 3 years ago

ajxchapman commented 3 years ago

Allow individual routes to override the variables defined in config.json, this could help with things like allowing different webhooks endpoints based on the route, rather than the generic definition from config.json

ajxchapman commented 3 years ago

This can already be achieved by passing arguments to scripts using the kwargs definition, e.g.

"action" : {
  "module" : "./scripts/slack_alert_middleware/slack_alert.py",
  "function" : "http_alert",
  "kwargs" : {
    "webhook" : "{{slack_webhook_url}}"
  }
}

Is there any benefit of implementing an additional override?