spring-cloud/spring-cloud-gateway
在 GitHub 查看Request headers can not be modified after request pass through ModifyRequestBodyGatewayFilter
Open
#2,548 建立於 2022年3月11日
documentationhelp wanted
倉庫指標
- Star
- (4,284 star)
- PR 合併指標
- (平均合併 1天 21小時) (30 天內合併 18 個 PR)
描述
Describe the bug Spring cloud version:3.0.3 I am using ModifyRequestBodyGatewayFilter to cache request body, but when request pass through ModifyRequestBodyGatewayFilter, heads can not be modified any more, at opposite, headers can be modified before ModifyRequestBodyGatewayFilter.
I guess this problem happened because decorate method from ModifyRequestBodyGatewayFilterFactory. Spring cloud gateway user can not get new headers from MutatedServerHttpRequest but can only get header from the time point when decorate method be called.

I am not sure this is an issue or it's a mistake about my usage.