From 7f03cbbff5028ea41a9aaf990e44267863248cd0 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Thu, 3 Aug 2023 13:11:56 +0900 Subject: [PATCH] [fix] throw only on web --- src/ts/process/request.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ts/process/request.ts b/src/ts/process/request.ts index f37ff8f0..57f4c853 100644 --- a/src/ts/process/request.ts +++ b/src/ts/process/request.ts @@ -215,9 +215,11 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model' body.stream = true let urlHost = new URL(replacerURL).host if(urlHost.includes("localhost") || urlHost.includes("172.0.0.1") || urlHost.includes("0.0.0.0")){ - return { - type: 'fail', - result: 'You are trying local request on streaming. this is not allowed dude to browser/os security policy. turn off streaming.', + if(!isTauri){ + return { + type: 'fail', + result: 'You are trying local request on streaming. this is not allowed dude to browser/os security policy. turn off streaming.', + } } } const da = (throughProxi)