-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 c457ecb Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Mar 27 15:35:32 2023 +0500 docker: imp docs commit fddabb9 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Mar 27 15:18:22 2023 +0500 docker: skip ssl check
- Loading branch information
1 parent
d58772f
commit 132ec55
Showing
2 changed files
with
11 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,13 @@ | ||
BEGIN { scheme = "http" } | ||
|
||
# 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 } | ||
|
||
/force_https: true$/ { scheme = "https" } | ||
|
||
/port_https:/ { https_port = $2 } | ||
|
||
/server_name:/ { https_host = $2 } | ||
|
||
END { | ||
if (scheme == "https") { | ||
host = https_host | ||
port = https_port | ||
} | ||
if (match(host, ":")) { | ||
print scheme "://[" host "]:" port | ||
print "http://[" host "]:" port | ||
} else { | ||
print scheme "://" host ":" port | ||
print "http://" host ":" port | ||
} | ||
} |