[feat] added tokens for reverse proxy

This commit is contained in:
kwaroran
2023-07-22 01:04:29 +09:00
parent 3250831c1a
commit 873f9cf6f8
2 changed files with 32 additions and 14 deletions

View File

@@ -201,7 +201,8 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
headers: {
"risu-header": encodeURIComponent(JSON.stringify(headers)),
"risu-url": encodeURIComponent(replacerURL),
"Content-Type": "application/json"
"Content-Type": "application/json",
"x-risu-tk": "use"
},
method: "POST",
signal: abortSignal
@@ -268,7 +269,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
const res = await globalFetch(replacerURL, {
body: body,
headers: headers,
abortSignal
abortSignal,
})
const dat = res.data as any