修正方法名中的单词错误:`Form` -> `From`

pull/284/head
王良 2024-03-26 15:02:03 +08:00
parent 3048ae7ff1
commit d513442c49
3 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ let socketId = 0
let httpsOverHttpAgent, httpOverHttpsAgent, httpsOverHttpsAgent
util.getOptionsFormRequest = (req, ssl, externalProxy = null) => {
util.getOptionsFromRequest = (req, ssl, externalProxy = null) => {
// eslint-disable-next-line node/no-deprecated-api
const urlObject = url.parse(req.url)
const defaultPort = ssl ? 443 : 80

View File

@ -15,7 +15,7 @@ module.exports = function createRequestHandler (createIntercepts, middlewares, e
return function requestHandler (req, res, ssl) {
let proxyReq
const rOptions = commonUtil.getOptionsFormRequest(req, ssl, externalProxy)
const rOptions = commonUtil.getOptionsFromRequest(req, ssl, externalProxy)
if (rOptions.agent) {
rOptions.agent.options.rejectUnauthorized = setting.verifySsl

View File

@ -8,7 +8,7 @@ const log = require('../../../utils/util.log')
module.exports = function createUpgradeHandler () {
// return
return function upgradeHandler (req, cltSocket, head, ssl) {
const clientOptions = util.getOptionsFormRequest(req, ssl)
const clientOptions = util.getOptionsFromRequest(req, ssl)
const proxyReq = (ssl ? https : http).request(clientOptions)
proxyReq.on('error', (e) => {
log.error('upgradeHandler', e)