From 6ff83b20df58436e82c9e4d09dec3df8e451a45c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=BF=90=E5=AE=B6?= Date: Fri, 14 Jun 2024 16:55:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=B7=E6=B1=82=E5=A4=B4?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E5=8F=82=E6=95=B0=E5=A4=84=E7=90=86=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/src/middleware/req_ctx.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/middleware/req_ctx.rs b/library/src/middleware/req_ctx.rs index 2574f05..e2faf89 100644 --- a/library/src/middleware/req_ctx.rs +++ b/library/src/middleware/req_ctx.rs @@ -42,7 +42,7 @@ pub async fn authenticate_ctx(mut req: Request, next: Next) -> Response { if value_str.is_empty() { String::from("zh-CN") } else { - String::from(value_str[1]) + String::from(value_str[0]) } }, None => String::from("zh-CN"),