From 3c269a9445c0ba70e031749bbd43acc6d548cfbc Mon Sep 17 00:00:00 2001 From: yanghao05 Date: Tue, 29 Apr 2025 20:32:21 +0800 Subject: [PATCH] feat: update --- backend/pkg/utils/fiber.go | 2 +- frontend/wechat/src/api/client.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/pkg/utils/fiber.go b/backend/pkg/utils/fiber.go index d0c85cd..be1829a 100644 --- a/backend/pkg/utils/fiber.go +++ b/backend/pkg/utils/fiber.go @@ -12,7 +12,7 @@ func FullURI(ctx fiber.Ctx) string { if err != nil { return "" } - u.Scheme = ctx.Protocol() + u.Scheme = ctx.Scheme() u.Host = ctx.Host() return u.String() diff --git a/frontend/wechat/src/api/client.js b/frontend/wechat/src/api/client.js index 368edc0..9af86f2 100644 --- a/frontend/wechat/src/api/client.js +++ b/frontend/wechat/src/api/client.js @@ -7,6 +7,9 @@ const client = axios.create({ withCredentials: true, headers: { 'Content-Type': 'application/json', + 'X-Requested-With': 'XMLHttpRequest', + 'Accept': 'application/json', + 'Accept-Language': 'zh-CN,zh;q=0.9', } });