AdGuardHome/docker/web-bind.awk
Eugene Burkov 132ec556dc Pull request 1788: 5642-fix-healthcheck-ssl
Merge in DNS/adguard-home from 5642-fix-healthcheck-ssl to master

Updates #5642.
Updates #3290.

Squashed commit of the following:

commit c457ecbc08f58bb4f31bade314dd447832c5bfed
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Mon Mar 27 15:35:32 2023 +0500

    docker: imp docs

commit fddabb95118a85921bf4f50e9b91f4602ba02b0f
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Mon Mar 27 15:18:22 2023 +0500

    docker: skip ssl check
2023-03-27 13:43:38 +03:00

13 lines
337 B
Awk

# Don't consider the HTTPS hostname since the enforced HTTPS redirection should
# work if the SSL check skipped. See file docker/healthcheck.sh.
/^bind_host:/ { host = $2 }
/^bind_port:/ { port = $2 }
END {
if (match(host, ":")) {
print "http://[" host "]:" port
} else {
print "http://" host ":" port
}
}