mirror of https://github.com/halo-dev/halo
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
parent
aeaa47f6c4
commit
7cc3dfa0a0
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue