【问题标题】:How can I change cache control on actuator routes?如何更改执行器路由上的缓存控制?
【发布时间】:2016-08-05 01:25:21
【问题描述】:

由于您不倾向于编写执行器控制器,它们是为您编写的,您将如何添加,例如 cache-control: nocache/health

【问题讨论】:

    标签: spring spring-mvc spring-boot spring-java-config spring-boot-actuator


    【解决方案1】:

    official documentation

    ...响应被缓存一段可配置的时间,以防止端点被用于拒绝服务攻击。 endpoints.health.time-to-live 属性用于配置缓存周期(以毫秒为单位)。它默认为 1000,即一秒。

    这仅适用于 /health 端点,但是,其他执行器端点似乎没有此属性。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-09
      • 2011-08-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多