Allow the user to opt-out of anonymous access restrictions for /health

By default, when /health is accessed anonymously, the details are
stripped, i.e. the response will only indicate UP or DOWN. Furthermore
the response is cached for a configurable period to prevent a denial
of service attack.

This commit adds a configuration property,
endpoints.health.restrict-anonymous-access, that can be set to false
to allow full anonymous access to /health. When full access is
allowed, the details will be included in the response and the response
will not be cached.

Closes gh-1977
This commit is contained in:
Andy Wilkinson
2014-11-25 11:47:37 +00:00
parent 5854ea189e
commit 26a511495e
4 changed files with 92 additions and 19 deletions

View File

@@ -404,6 +404,7 @@ content into your application; rather pick only the properties that you need.
endpoints.health.id=health
endpoints.health.sensitive=false
endpoints.health.enabled=true
endpoints.health.restrict-anonymous-access=true
endpoints.health.time-to-live=1000
endpoints.info.id=info
endpoints.info.sensitive=false