Skip to content

Commit c009a68

Browse files
author
Kristan Kenney
committed
Disable automatic www alias on web domain creation
Due to issues with certain regional TLDs not triggering automatic creation, this functionality has been removed, with the aliases field being moved from Advanced Options to the main area. This will be noted in the documentation for new domain creation.
1 parent bc55bb1 commit c009a68

File tree

3 files changed

+11
-30
lines changed

3 files changed

+11
-30
lines changed

bin/v-add-web-domain

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,7 @@ fi
115115
if [ "$aliases" = 'none' ]; then
116116
ALIAS=''
117117
else
118-
ALIAS="www.$domain"
119-
if [ -z "$aliases" ]; then
120-
# Check and skip www alias for subdomains.
121-
IFS='.' read -r -a domain_elements <<< "$domain"
122-
if [ "${#domain_elements[@]}" -gt 2 ]; then
123-
ALIAS=""
124-
else
125-
ALIAS="www.$domain"
126-
fi
127-
else
128-
ALIAS="$aliases"
129-
fi
118+
ALIAS="$aliases"
130119

131120
ip_alias=$(get_ip_alias $domain)
132121
if [ ! -z "$ip_alias" ]; then

web/js/pages/add_web.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,6 @@ App.Listeners.WEB.keypress_domain_name();
172172

173173

174174
$(function() {
175-
$('#v_domain').change(function() {
176-
var prefix = 'www.';
177-
if (((document.getElementById('v_domain').value).split(".")).length > 2) {
178-
document.getElementById('v_aliases').value = "";
179-
} else {
180-
document.getElementById('v_aliases').value = prefix + document.getElementById('v_domain').value;
181-
}
182-
});
183175
App.Actions.WEB.toggle_letsencrypt($('input[name=v_letsencrypt]'))
184176

185177
$('select[name="v_stats"]').change(function(evt){

web/templates/admin/add_web.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@
6767
<input type="text" size="20" class="vst-input" name="v_domain" id="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
6868
</td>
6969
</tr>
70+
<tr>
71+
<td class="vst-text input-label">
72+
<?php print __('Aliases');?>
73+
</td>
74+
</tr>
75+
<tr>
76+
<td>
77+
<textarea size="20" class="vst-textinput short" name="v_aliases" id="v_aliases" ><?=htmlentities(trim($v_aliases, "'"))?></textarea>
78+
</td>
79+
</tr>
7080
<tr>
7181
<td class="vst-text input-label">
7282
<?php print __('IP address');?>
@@ -106,16 +116,6 @@
106116
</tr>
107117
</table>
108118
<table class="data-col2" width="600px" style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
109-
<tr>
110-
<td class="vst-text input-label">
111-
<?php print __('Aliases');?>
112-
</td>
113-
</tr>
114-
<tr>
115-
<td>
116-
<textarea size="20" class="vst-textinput short" name="v_aliases" id="v_aliases" ><?=htmlentities(trim($v_aliases, "'"))?></textarea>
117-
</td>
118-
</tr>
119119
<?php if (!empty($_SESSION['PROXY_SYSTEM'])) { echo ""; ?>
120120
<tr>
121121
<td class="vst-text step-top" >

0 commit comments

Comments
 (0)