redirect http TS url to https TS url

This commit is contained in:
ljm42
2024-09-23 12:59:05 -07:00
parent 8f656e87b1
commit e8e5ccdf18

View File

@@ -289,6 +289,15 @@ build_servers(){
fi
if [[ -n $TSFQDN ]]; then
cat <<- EOF >>$SERVERS
#
# Redirect Tailscale http requests to https
# ex: http://tower.magicDNS.ts.net -> https://tower.magicDNS.ts.net
#
server {
$(listen $PORT)
server_name $TSFQDN;
return 302 https://$TSFQDN$PORTSSL_URL$request_uri;
}
#
# Port settings for https using Tailscale cert
# ex: https://tower.magicDNS.ts.net