mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-06-19 07:36:59 +00:00
fix(site): satisfy strict listen regex lint
Escape the IPv6 listen closing bracket explicitly so the strict regexp lint rule accepts TLS listen parsing.
This commit is contained in:
@@ -6,7 +6,7 @@ function getListenPort(params: string) {
|
||||
if (!firstToken)
|
||||
return ''
|
||||
|
||||
const ipv6Port = firstToken.match(/^\[[^\]]+]:(\d+)$/)
|
||||
const ipv6Port = firstToken.match(/^\[[^\]]+\]:(\d+)$/)
|
||||
if (ipv6Port)
|
||||
return ipv6Port[1]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user