NiiazKhan

Results 7 comments of NiiazKhan

I have the same problem, did you find a solution?

@fabian-dev bad documentation. It doesn't work, it is incorrect: `spring: cloud: gateway: routes:` **Correct option is :** `spring: cloud: gateway: mvc: routes:` here: https://docs.spring.io/spring-cloud-gateway/reference/spring-cloud-gateway-server-mvc/filters/addrequestheader.html#:~:text=AddRequestHeader%D0%A4%D0%B8%D0%BB%D1%8C%D1%82%D1%80-,AddRequestHeader%D0%A4%D0%B8%D0%BB%D1%8C%D1%82%D1%80,-%D0%AD%D1%82%D0%BE%20AddRequestHeader%D1%84%D0%B8%D0%BB%D1%8C%D1%82%D1%80

@kempf856 Thank you, I am aware of this approach, but it will look quite odd when I have many endpoints and want to categorize them by types such as GET/POST/UPDATE/DELETE...

@Andross96 i hope this helps you https://stackoverflow.com/questions/77744944/spring-cloud-gateway-server-mvc-add-header-from-authentication-for-all-requests . But pay attention https://stackoverflow.com/questions/78009495/spring-cloud-gateway-mvc-unpredictable-order-of-operation-of-custom-filters

@Andross96 I am monitoring these issues: https://github.com/spring-cloud/spring-cloud-gateway/issues/3250 https://github.com/spring-cloud/spring-cloud-gateway/issues/3268

I might not fully understand your question, but, as I see in my project on Java 21 and MVC gateway, the context and tracing are passed from the MVC gateway...

@bsgrd try pass requestBody. `next.handle(requestBody);`