fix: remove httpOnly from language cookie to allow JS to access current language (#6933)

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

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

此问题为 https://github.com/halo-dev/halo/pull/6891 导致

#### Does this PR introduce a user-facing change?
```release-note
修复登录时切换了其他语言但是登录成功后始终显示中文的问题
```
pull/6939/head
guqing 2024-10-23 11:34:17 +08:00 committed by GitHub
parent aeaa47f6c4
commit 7cc3dfa0a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 1 deletions

View File

@ -54,7 +54,6 @@ public class LocaleChangeWebFilter implements WebFilter {
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();