fix issue: only one cookie in request should can be removed if you want
@@ -93,8 +93,8 @@ public class RequestPlugin extends AbstractShenyuPlugin {
private void setHeaders(final HttpHeaders headers, final ServerHttpRequest request, final RequestHandle requestHandle) {
List<HttpCookie> cookies = getCookies(request, requestHandle).values().stream()
.flatMap(Collection::stream).collect(Collectors.toList());
- if (CollectionUtils.isNotEmpty(cookies)) {
headers.remove(HttpHeaders.COOKIE);
+ if (CollectionUtils.isNotEmpty(cookies)) {
headers.set(HttpHeaders.COOKIE, StringUtils.join(cookies, "; "));
}
