[refactor] proxy2
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user