Skip to content

Commit

Permalink
Fix the bug of extracting request cookie in Spring Cloud Gateway adap…
Browse files Browse the repository at this point in the history
…ter (alibaba#1400)
  • Loading branch information
chenzhiguo authored Apr 13, 2020
1 parent dd74043 commit 7765679
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public String getUrlParam(ServerWebExchange exchange, String paramName) {

@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);
}
Expand Down

0 comments on commit 7765679

Please sign in to comment.