Fix the bug of extracting request cookie in Spring Cloud Gateway adapter (#1400)
This commit is contained in:
parent
6a7ec708bc
commit
7c361aab13
|
|
@ -55,7 +55,7 @@ public class ServerWebExchangeItemParser implements RequestItemParser<ServerWebE
|
|||
|
||||
@Override
|
||||
public String getCookieValue(ServerWebExchange exchange, String cookieName) {
|
||||
return Optional.ofNullable(exchange.getResponse().getCookies().getFirst(cookieName))
|
||||
return Optional.ofNullable(exchange.getRequest().getCookies().getFirst(cookieName))
|
||||
.map(HttpCookie::getValue)
|
||||
.orElse(null);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue