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:
15
valet
15
valet
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user