[add] added 403 catchall for invalid domains
This commit is contained in:
@@ -199,6 +199,11 @@ function cert_exists()
|
||||
[ -f "$cert_path/fullchain.pem" ]
|
||||
}
|
||||
|
||||
function dummy_cert_exists()
|
||||
{
|
||||
cert_exists 0 nixdomain
|
||||
}
|
||||
|
||||
function certs_daemon()
|
||||
{
|
||||
(
|
||||
@@ -242,7 +247,7 @@ function nginx_handler()
|
||||
|
||||
# wait for certs to exist before starting nginx
|
||||
# just have nginx crash after n retries (default 10)
|
||||
while ! read_file cert_exists "$domain_file" && [ "$retries" -lt "$server_retries" ]; do
|
||||
while ! read_file cert_exists "$domain_file" && ! dummy_cert_exists && [ "$retries" -lt "$server_retries" ]; do
|
||||
log nginx_handler "Waiting for certs to be created"
|
||||
retries=$(( retries+1 ))
|
||||
sleep_wait 1
|
||||
|
||||
Reference in New Issue
Block a user