Merge pull request #51 from auriti/fix/proxy-wss-default-port
fix: use correct default port for wss:// in NO_PROXY matching
This commit is contained in:
@@ -97,7 +97,9 @@ export function shouldBypassProxy(
|
||||
try {
|
||||
const url = new URL(urlString)
|
||||
const hostname = url.hostname.toLowerCase()
|
||||
const port = url.port || (url.protocol === 'https:' ? '443' : '80')
|
||||
const port = url.port || (
|
||||
url.protocol === 'https:' || url.protocol === 'wss:' ? '443' : '80'
|
||||
)
|
||||
const hostWithPort = `${hostname}:${port}`
|
||||
|
||||
// Split by comma or space and trim each entry
|
||||
|
||||
Reference in New Issue
Block a user