ソースを参照

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.
Kristan Kenney 6 年 前
コミット
c009a6802e
3 ファイル変更11 行追加30 行削除
  1. 1 12
      bin/v-add-web-domain
  2. 0 8
      web/js/pages/add_web.js
  3. 10 10
      web/templates/admin/add_web.html

+ 1 - 12
bin/v-add-web-domain

@@ -115,18 +115,7 @@ fi
 if [ "$aliases" = 'none' ]; then
 if [ "$aliases" = 'none' ]; then
     ALIAS=''
     ALIAS=''
 else
 else
-    ALIAS="www.$domain"
-    if [ -z "$aliases" ]; then
-        # Check and skip www alias for subdomains.
-        IFS='.' read -r -a domain_elements <<< "$domain"
-        if [ "${#domain_elements[@]}" -gt 2 ]; then
-            ALIAS=""
-        else
-            ALIAS="www.$domain"
-        fi
-    else
-        ALIAS="$aliases"
-    fi
+    ALIAS="$aliases"
 
 
     ip_alias=$(get_ip_alias $domain)
     ip_alias=$(get_ip_alias $domain)
     if [ ! -z "$ip_alias" ]; then
     if [ ! -z "$ip_alias" ]; then

+ 0 - 8
web/js/pages/add_web.js

@@ -172,14 +172,6 @@ App.Listeners.WEB.keypress_domain_name();
 
 
 
 
 $(function() {
 $(function() {
-    $('#v_domain').change(function() {
-        var prefix = 'www.';
-        if (((document.getElementById('v_domain').value).split(".")).length > 2) {
-            document.getElementById('v_aliases').value = "";
-        } else {
-            document.getElementById('v_aliases').value = prefix + document.getElementById('v_domain').value;
-        }
-    });
     App.Actions.WEB.toggle_letsencrypt($('input[name=v_letsencrypt]'))
     App.Actions.WEB.toggle_letsencrypt($('input[name=v_letsencrypt]'))
 
 
     $('select[name="v_stats"]').change(function(evt){
     $('select[name="v_stats"]').change(function(evt){

+ 10 - 10
web/templates/admin/add_web.html

@@ -67,6 +67,16 @@
                                 <input type="text" size="20" class="vst-input" name="v_domain" id="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
                                 <input type="text" size="20" class="vst-input" name="v_domain" id="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
                             </td>
                             </td>
                         </tr>
                         </tr>
+                        <tr>
+                            <td class="vst-text input-label">
+                                <?php print __('Aliases');?>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <textarea size="20" class="vst-textinput short" name="v_aliases" id="v_aliases" ><?=htmlentities(trim($v_aliases, "'"))?></textarea>
+                            </td>
+                        </tr>
                         <tr>
                         <tr>
                             <td class="vst-text input-label">
                             <td class="vst-text input-label">
                                 <?php print __('IP address');?>
                                 <?php print __('IP address');?>
@@ -106,16 +116,6 @@
                         </tr>
                         </tr>
                     </table>
                     </table>
                     <table class="data-col2" width="600px" style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
                     <table class="data-col2" width="600px" style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
-                        <tr>
-                            <td class="vst-text input-label">
-                                <?php print __('Aliases');?>
-                            </td>
-                        </tr>
-                        <tr>
-                            <td>
-                                <textarea size="20" class="vst-textinput short" name="v_aliases" id="v_aliases" ><?=htmlentities(trim($v_aliases, "'"))?></textarea>
-                            </td>
-                        </tr>
                         <?php if (!empty($_SESSION['PROXY_SYSTEM'])) { echo ""; ?>
                         <?php if (!empty($_SESSION['PROXY_SYSTEM'])) { echo ""; ?>
                         <tr>
                         <tr>
                             <td class="vst-text step-top" >
                             <td class="vst-text step-top" >