logback.xml 来自 spring-cloud-config 带有 Vault 和 git 后端的服务器

logback.xml from spring-cloud-config server with Vault and git backend

我有一个使用 git 和保管库后端的配置服务器以及几个访问配置服务器的客户端,到目前为止一切正常。现在我也想集中日志记录配置(因为它们都会记录到 logstash)并将 logback.xml 添加到存储库。

现在我面临一个一直存在但从来不是问题的基本问题:配置服务器只接受具有 "X-Config-Token" header 的请求,否则它只会拒绝请求. header 值本身并不重要,它必须存在。有没有办法绕过这个限制?我放了

logging: config: ${spring.cloud.config.uri}/${spring.application.name}/${spring.profiles.active}/master/logback.xml

在我的 bootstrap.yml 中,显然不能发送任何 header。令我感到困惑的是,没有令牌的请求会被拒绝,并且 Spring 不仅从 git 提供服务,而且在没有令牌时会忽略 Vault。

感谢您的帮助!

这是 Spring 中的错误,请参阅 https://github.com/spring-cloud/spring-cloud-config/issues/1512