Kayou
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
0 deletions
-
scripts/_common.sh
|
|
@ -38,6 +38,9 @@ is_url_handled() { |
|
|
# Manage arguments with getopts |
|
|
# Manage arguments with getopts |
|
|
ynh_handle_getopts_args "$@" |
|
|
ynh_handle_getopts_args "$@" |
|
|
|
|
|
|
|
|
|
|
|
# Wait untils nginx has fully reloaded (avoid curl fail with http2) |
|
|
|
|
|
sleep 2 |
|
|
|
|
|
|
|
|
# Try to get the url with curl, and keep the http code and an eventual redirection url. |
|
|
# Try to get the url with curl, and keep the http code and an eventual redirection url. |
|
|
local curl_output="$(curl --insecure --silent --output /dev/null \ |
|
|
local curl_output="$(curl --insecure --silent --output /dev/null \ |
|
|
--write-out '%{http_code};%{redirect_url}' https://127.0.0.1$path --header "Host: $domain" --resolve $domain:443:127.0.0.1)" |
|
|
--write-out '%{http_code};%{redirect_url}' https://127.0.0.1$path --header "Host: $domain" --resolve $domain:443:127.0.0.1)" |
|
|
|