[refactor] proxy2

This commit is contained in:
kwaroran
2023-07-07 06:20:02 +09:00
parent 73b86f0a64
commit ead670516d
8 changed files with 76 additions and 87 deletions

View File

@@ -181,7 +181,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
if(db.useStreaming && arg.useStreaming){
body.stream = true
const da = ((!isTauri) && (!isNodeServer))
? await fetch(`/proxy?url=${encodeURIComponent(replacerURL)}`, {
? await fetch(`/proxy2?url=${encodeURIComponent(replacerURL)}`, {
body: JSON.stringify(body),
headers: {
"risu-header": encodeURIComponent(JSON.stringify({

View File

@@ -617,7 +617,7 @@ export async function globalFetch(url:string, arg:{plainFetchForce?:boolean,body
}
}
if(arg.rawResponse){
const furl = `/proxy?url=${encodeURIComponent(url)}`
const furl = `/proxy2?url=${encodeURIComponent(url)}`
const da = await fetch(furl, {
body: body,
@@ -637,8 +637,8 @@ export async function globalFetch(url:string, arg:{plainFetchForce?:boolean,body
}
}
else{
const furl = hubURL + `/proxy?url=${encodeURIComponent(url)}`
const furl = `/proxy2?url=${encodeURIComponent(url)}`
const da = await fetch(furl, {
body: body,
headers: {