File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,6 +67,11 @@ export default defineManifest(async (env) => {
6767 enabled : true ,
6868 path : 'src/rules/qianwen.json' ,
6969 } ,
70+ {
71+ id : 'ruleset_baichuan' ,
72+ enabled : true ,
73+ path : 'src/rules/baichuan.json' ,
74+ } ,
7075 ] ,
7176 } ,
7277 }
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ interface UserInfo {
99export async function getUserInfo ( ) : Promise < UserInfo > {
1010 const resp = await ofetch < { data ?: UserInfo ; code : number ; msg : string } > (
1111 'https://www.baichuan-ai.com/api/user/user-info' ,
12+ { method : 'POST' } ,
1213 )
1314 if ( resp . code === 401 ) {
1415 throw new ChatError ( '请先登录百川账号' , ErrorCode . BAICHUAN_WEB_UNAUTHORIZED )
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "id" : 1 ,
4+ "priority" : 1 ,
5+ "action" : {
6+ "type" : " modifyHeaders" ,
7+ "requestHeaders" : [
8+ {
9+ "header" : " origin" ,
10+ "operation" : " set" ,
11+ "value" : " https://www.baichuan-ai.com"
12+ },
13+ {
14+ "header" : " referer" ,
15+ "operation" : " set" ,
16+ "value" : " https://www.baichuan-ai.com"
17+ }
18+ ]
19+ },
20+ "condition" : {
21+ "requestDomains" : [" www.baichuan-ai.com" ],
22+ "resourceTypes" : [" xmlhttprequest" ]
23+ }
24+ }
25+ ]
You can’t perform that action at this time.
0 commit comments