diff --git a/virtual_feature.pl b/virtual_feature.pl index 943d3dc..1b09c9d 100644 --- a/virtual_feature.pl +++ b/virtual_feature.pl @@ -266,6 +266,11 @@ sub feature_setup # Update DANE DNS records &virtual_server::sync_domain_tlsa_records($d); +# Redirect HTTP to HTTPS +if ($tmpl->{'web_sslredirect'} || $d->{'auto_redirect'}) { + &virtual_server::create_redirect($d, &virtual_server::get_redirect_to_ssl($d)); + } + # Try to request a Let's Encrypt cert when enabling SSL post-creation for # the first time if (!$d->{'creating'} && $generated && $d->{'auto_letsencrypt'} &&