fix: normalize localhost listen address (#3016)

This commit is contained in:
Alexlangl
2026-06-07 20:40:14 +08:00
committed by GitHub
parent 27c41f7416
commit aa09c9cb62
+3 -1
View File
@@ -144,6 +144,8 @@ export function ProxyPanel({
return false;
}
};
const normalizedAddress =
addressTrimmed === "localhost" ? "127.0.0.1" : addressTrimmed;
const isValidAddress =
addressTrimmed === "localhost" ||
addressTrimmed === "0.0.0.0" ||
@@ -181,7 +183,7 @@ export function ProxyPanel({
try {
await updateGlobalConfig.mutateAsync({
...globalConfig,
listenAddress: addressTrimmed,
listenAddress: normalizedAddress,
listenPort: port,
});
toast.success(