修改请求头语言参数处理逻辑

This commit is contained in:
李运家 2024-06-14 16:55:03 +08:00
parent a7eec7882e
commit 6ff83b20df

View File

@ -42,7 +42,7 @@ pub async fn authenticate_ctx(mut req: Request, next: Next) -> Response {
if value_str.is_empty() { if value_str.is_empty() {
String::from("zh-CN") String::from("zh-CN")
} else { } else {
String::from(value_str[1]) String::from(value_str[0])
} }
}, },
None => String::from("zh-CN"), None => String::from("zh-CN"),