Update proxy.ts

This commit is contained in:
Ferenc Hammerl
2023-03-02 11:38:57 +01:00
committed by GitHub
parent e4ae385d1a
commit 5d8e1ee68b

View File

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