Skip to content

Commit

Permalink
fix: remove httpOnly from language cookie to allow JS to access curre…
Browse files Browse the repository at this point in the history
…nt language (#6933)

#### What type of PR is this?
/kind bug
/area core
/milestone 2.20.x

#### What this PR does / why we need it:
修复登录时切换了其他语言但是登录成功后始终显示中文的问题

此问题为 #6891 导致

#### Does this PR introduce a user-facing change?
```release-note
修复登录时切换了其他语言但是登录成功后始终显示中文的问题
```
  • Loading branch information
guqing authored Oct 23, 2024
1 parent aeaa47f commit 7cc3dfa
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
void setLanguageCookie(ServerWebExchange exchange, Locale locale) {
var cookie = ResponseCookie.from(LANGUAGE_COOKIE_NAME, locale.toLanguageTag())
.path("/")
.httpOnly(true)
.secure("https".equalsIgnoreCase(exchange.getRequest().getURI().getScheme()))
.sameSite("Lax")
.build();
Expand Down

0 comments on commit 7cc3dfa

Please sign in to comment.