Skip to content

Commit a2bb109

Browse files
authored
Enable ipv6 in nginx (if available) (#12938)
* Revert "Feat(nginx): Add support for IPv6" This reverts commit e9d9872. * Feat(nginx): Add support for IPv6 * proper handling non-IPv6 hosts
1 parent 33f6e36 commit a2bb109

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docker/entrypoint-nginx.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ else
2020
NGINX_CONFIG="/etc/nginx/nginx.conf"
2121
fi
2222

23+
if ! ip -6 addr show dev lo | grep -q 'inet6 ::1'; then
24+
sed -i '/listen \[::\]:/d' "$NGINX_CONFIG"
25+
fi
26+
2327
if [ "${NGINX_METRICS_ENABLED}" = true ]; then
2428
sed -i "s/#stub_status/stub_status/g;" $NGINX_CONFIG
2529
echo "Nginx metrics are enabled"

0 commit comments

Comments
 (0)