1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/baikal_ynh.git synced 2024-09-03 18:16:11 +02:00

add resolve parameter

This commit is contained in:
Kay0u 2020-03-13 23:01:26 +01:00
parent 8ab06e7bd0
commit 12a2e4ef63
No known key found for this signature in database
GPG key ID: 7FF262C033518333

View file

@ -24,7 +24,7 @@ is_url_handled() {
# 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 \
--write-out '%{http_code};%{redirect_url}' https://127.0.0.1$path --header "Host: $domain")"
--write-out '%{http_code};%{redirect_url}' https://127.0.0.1$path --header "Host: $domain" --resolve $domain:443:127.0.0.1)"
# Cut the output and keep only the first part to keep the http code
local http_code="${curl_output%%;*}"