mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Update node types
This commit is contained in:
@ -1,11 +1,9 @@
|
||||
import process from 'node:process';
|
||||
import { createRequire } from 'node:module';
|
||||
import http from 'node:http';
|
||||
import https from 'node:https';
|
||||
import { ProxyAgent } from 'proxy-agent';
|
||||
import { isValidUrl, color } from './util.js';
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
const http = require('http');
|
||||
const https = require('https');
|
||||
const LOG_HEADER = '[Request Proxy]';
|
||||
|
||||
/**
|
||||
@ -37,7 +35,6 @@ export default function initRequestProxy({ enabled, url, bypass }) {
|
||||
// Reference: https://github.com/Rob--W/proxy-from-env
|
||||
process.env.all_proxy = url;
|
||||
|
||||
|
||||
if (Array.isArray(bypass) && bypass.length > 0) {
|
||||
process.env.no_proxy = bypass.join(',');
|
||||
}
|
||||
|
Reference in New Issue
Block a user