spring-cloud / spring-cloud-openfeign

Support for using OpenFeign in Spring Cloud apps
Apache License 2.0
1.17k stars 756 forks source link

RequestInterceptor not injecting headers after upgrading it to 2023.0.1 #1026

Closed wllianwd closed 2 months ago

wllianwd commented 2 months ago

Update Checking more in details, it was an internal issue.

Describe the bug After upgrading Spring Cloud from 2023.0.0 to 2023.0.1, the interceptors I have to propagate headers are not working anymore.

Sample Here the sample class of the interceptor, debugging it, I can see the header is properly set here, but the client never receives it:

class MySampletRequestIdInterceptor : RequestInterceptor {

    override fun apply(requestTemplate: RequestTemplate) {
        val correlationId = "sample"
        requestTemplate.header("MY_HEADER", correlationId)
    }
}