fix: do not generate https urls when there is no certificate available
This commit is contained in:
@@ -147,10 +147,14 @@ fn-domains-generate-urls-from-config() {
|
|||||||
done
|
done
|
||||||
shopt -u nullglob
|
shopt -u nullglob
|
||||||
elif [[ -n "$APP_PORT_MAP" ]]; then
|
elif [[ -n "$APP_PORT_MAP" ]]; then
|
||||||
|
CERTS_EXIST="$(plugn trigger certs-exists "$APP")"
|
||||||
local port_map
|
local port_map
|
||||||
while IFS= read -r port_map; do
|
while IFS= read -r port_map; do
|
||||||
local scheme="$(awk -F ':' '{ print $1 }' <<<"$port_map")"
|
local scheme="$(awk -F ':' '{ print $1 }' <<<"$port_map")"
|
||||||
local listen_port="$(awk -F ':' '{ print $2 }' <<<"$port_map")"
|
local listen_port="$(awk -F ':' '{ print $2 }' <<<"$port_map")"
|
||||||
|
if [[ "$CERTS_EXIST" != "true" ]] && [[ "$scheme" == "https" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
fn-domains-generate-url "$scheme" "$VHOST" "$listen_port"
|
fn-domains-generate-url "$scheme" "$VHOST" "$listen_port"
|
||||||
done <<<"$APP_PORT_MAP"
|
done <<<"$APP_PORT_MAP"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user