I would like to forward a request header with a feign client RequestInterceptor but, within RequestInterceptor.apply
, RequestContextHolder.getRequestAttributes()
is null
, so is SecurityContextHolder.getContext().getAuthentication()
(where I could also eventually get the value of my header).
This used to work before upgrading to Spring-Cloud Brixton, where the hystrix commands must now probably be run in a separate thread, because changing to the following parameter solves the problem :
hystrix.command.default.execution.isolation.strategy: SEMAPHORE
Now, I'm not too keen on changing this kind of default values if not necessary, is there another, recommended, way of forwarding headers now ?
Thanks