1
0
Fork 0

Update proxy.ts

pull/1361/head
Ferenc Hammerl 2023-03-02 11:38:57 +01:00 committed by GitHub
parent e4ae385d1a
commit 5d8e1ee68b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -73,10 +73,10 @@ export function checkBypass(reqUrl: URL): boolean {
}
function isLoopbackAddress(host: string): boolean {
const hostUpper = host.toUpperCase()
const hostLower = host.toLowerCase()
return (
hostUpper === 'LOCALHOST' ||
hostUpper.startsWith('127.') ||
hostUpper.startsWith('::1')
hostLower === 'localhost' ||
hostLower.startsWith('127.') ||
hostLower.startsWith('::1')
)
}