Force internal server proxy to loopback (#521)
This commit is contained in:
parent
72e8da1dd4
commit
2b4760adfa
@ -217,7 +217,15 @@ export function getInternalServerServiceBaseUrl(): string {
|
||||
try {
|
||||
const parsed = new URL(external)
|
||||
if (LOCAL_HOSTNAMES.has(parsed.hostname)) {
|
||||
return normalizeBaseUrl(external)
|
||||
if (parsed.hostname !== '127.0.0.1') {
|
||||
parsed.hostname = '127.0.0.1'
|
||||
}
|
||||
|
||||
if (parsed.protocol === 'https:') {
|
||||
parsed.protocol = 'http:'
|
||||
}
|
||||
|
||||
return normalizeBaseUrl(parsed.toString())
|
||||
}
|
||||
} catch {
|
||||
// Ignore parsing errors and fall back to the internal default below.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user