1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-04 16:10:08 +01:00

fix for share of secured sites

This commit is contained in:
Sergio Bruder
2018-09-14 03:39:33 -03:00
parent 029b2d7633
commit ac7b371d49
2 changed files with 48 additions and 3 deletions

15
valet
View File

@@ -41,9 +41,18 @@ then
fi
done
# Fetch Ngrok URL In Background...
bash "$DIR/cli/scripts/fetch-share-url.sh" &
sudo -u $(logname) "$DIR/bin/ngrok" http "$HOST.$TLD:80" -host-header=rewrite ${*:2}
# Decide the correct PORT to use according if the site has a secure
# config or not.
if grep 443 "~/.config/valet/Nginx/$HOST*"
then
PORT=88
else
PORT=80
fi
# Fetch Ngrok URL In Background...
bash "$DIR/cli/scripts/fetch-share-url.sh" &
sudo -u $(logname) "$DIR/bin/ngrok" http "$HOST.$TLD:$PORT" -host-header=rewrite ${*:2}
exit
# Finally, for every other command we will just proxy into the PHP tool