fix: admin/options: changing the port while browsing with [::1] failed at redirection

Massimo Melina committed Jun 17, 2026 at 10:37 UTC 1c03598af2f64de206a0b53af0297c55339ea4f9
1 file changed +2
src/cross.ts
+2
@@ -462,6 +462,8 @@ export function isIpLan(ip: string) {
462 }
463
464 export function ipForUrl(ip: string) {
465 + if (ip.startsWith('['))
466 + return ip
467 const i = ip.indexOf(':')
468 return i >= 0 && ip.indexOf(':', i + 1) >= 0 ? `[${ip}]` : ip
469 }