spring_reference/V. Spring Boot Actuator/41.6. HTTP Health endpoint ...

6 lines
701 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 41.6. HTTP Health端点访问限制
通过health端点暴露的信息根据是否为匿名访问而不同。默认情况下当匿名访问时任何有关服务器的健康详情都被隐藏了该端点只简单的指示服务器是运行up还是停止down。此外当匿名访问时响应会被缓存一个可配置的时间段以防止端点被用于'拒绝服务'攻击。`endpoints.health.time-to-live`属性被用来配置缓存时间单位为毫秒默认为1000毫秒也就是1秒。
上述的限制可以被禁止从而允许匿名用户完全访问health端点。想达到这个效果可以将`endpoints.health.sensitive`设为`false`。