feat:add i18n header

(cherry picked from commit a1dbcd1f00)
This commit is contained in:
caiyuchao committed 2024-11-26 10:08:48 +08:00
1 parent d5035fc13d
commit 0331c5fa9d
1 file changed
+4 -1
+4 -1
View File
@@ -27,7 +27,10 @@ export const request = createFlatRequest<App.Service.Response, InstanceState>(
// set token
const token = localStg.get('token');
const Authorization = token ? `Bearer ${token}` : null;
Object.assign(headers, { Authorization });
// set language
const ContentLanguage = localStg.get('lang') || 'zh-CN';
Object.assign(headers, { Authorization, "Content-Language": ContentLanguage });
return config;
},