Setting:
admin:
healthChecks:
servletEnabled: false
as per the instructions here:
https://www.dropwizard.io/en/release-4.0.x/manual/configuration.html#health-checks
results in the healthcheck-enabled attribute getting set:
|
handler.getServletContext().setAttribute(HealthCheckServlet.HEALTH_CHECK_REGISTRY, healthChecks); |
However, the AdminServlet is checking for an initParamater rather than an attribute:
https://github.com/dropwizard/metrics/blob/v4.2.21/metrics-servlets/src/main/java/com/codahale/metrics/servlets/AdminServlet.java#L115

Also, am I right in thinking that, even if the above works, servletEnabled: false only affects the links shown, and the actual servlet/endpoint is still enabled and can still be accessed?
Many thanks
Versions:
dropwizard-core:4.0.3
metrics-jakarta.servlets:4.2.21