Loading templates/validate/urls.epp +2 −2 Original line number Diff line number Diff line Loading @@ -4,8 +4,8 @@ <%- if 'resolve_to' in $url { $pattern = '^(?:(https?):\/\/)?(?:[^@\/\n]+@)?([^:\/\n]+):?(\d+)?.*' $replace = 'proto: \1:domain: \2:port: \3' $url_data = Hash(regsubst($url['url'], $pattern, $replace, 'IG').split(':').map |$x| { $x.strip() }) $replace = 'proto:\1:domain:\2:port:\3:k:v' $url_data = Hash(regsubst($url['url'], $pattern, $replace, 'IG').split(':')) $domain = $url_data['domain'] if $url_data['port'].empty { Loading Loading
templates/validate/urls.epp +2 −2 Original line number Diff line number Diff line Loading @@ -4,8 +4,8 @@ <%- if 'resolve_to' in $url { $pattern = '^(?:(https?):\/\/)?(?:[^@\/\n]+@)?([^:\/\n]+):?(\d+)?.*' $replace = 'proto: \1:domain: \2:port: \3' $url_data = Hash(regsubst($url['url'], $pattern, $replace, 'IG').split(':').map |$x| { $x.strip() }) $replace = 'proto:\1:domain:\2:port:\3:k:v' $url_data = Hash(regsubst($url['url'], $pattern, $replace, 'IG').split(':')) $domain = $url_data['domain'] if $url_data['port'].empty { Loading