Skip to content

Commit 7f09d29

Browse files
authored
feat: extends DNS variable assignment to additionally handle IPv6 (#6976) (#6979)
(cherry picked from commit 716d1e4)
1 parent 9192e52 commit 7f09d29

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

config-ui/nginx.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if [ -n "$ADMIN_USER" ] && [ -n "$ADMIN_PASS" ]; then
2424
auth_basic_user_file /etc/nginx/.htpasswd;
2525
'
2626
fi
27-
export DNS=$(grep nameserver /etc/resolv.conf | awk '{print $2}')
27+
export DNS=$(awk 'BEGIN{ORS=" "} $1=="nameserver" {if ($2 ~ ":") {print "["$2"]"} else {print $2}}' /etc/resolv.conf)
2828
export DNS_VALID=${DNS_VALID:-300s}
2929
export DEVLAKE_ENDPOINT_PROTO=${DEVLAKE_ENDPOINT_PROTO:-http}
3030
export GRAFANA_ENDPOINT_PROTO=${GRAFANA_ENDPOINT_PROTO:-http}

0 commit comments

Comments
 (0)