Consul 抛出 spring 启动运行状况错误 Url (401)

Consul is throwing error of spring boot health Url (401)

我已经用我的 spring 启动应用程序配置了 consul,我有 basic Auth 来访问 url.

如果我点击 localhost:8081/health 它要求进行基本身份验证并且 状态为 UP

但是在 consul UI 中它抛出一个错误

HTTP GET http://192.168.1.155:8081/health: 401  Output: HTTP Status 401 - Full authentication is required to access this resource

如何在 consul 中提供此身份验证。

我在 spring 启动应用程序中禁用了安全健康,它工作正常,因为要检查健康我们不需要任何安全