允许在集群设置 -- “网站设置” 中设置节点IP访问显示的内容

This commit is contained in:
GoEdgeLab
2023-06-05 19:26:55 +08:00
parent d5c2c12817
commit 24db40540b
2 changed files with 25 additions and 5 deletions

View File

@@ -64,6 +64,7 @@ p { color: grey; }
</body>
</html>`
}
this.Data["httpAllDomainMismatchActionContentHTML"] = httpAllDomainMismatchActionContentHTML
this.Show()
@@ -77,6 +78,8 @@ func (this *IndexAction) RunPost(params struct {
HttpAllAllowMismatchDomainsJSON []byte
HttpAllAllowNodeIP bool
HttpAllDefaultDomain string
HttpAllNodeIPPageHTML string
HttpAllNodeIPShowPage bool
HttpAllForceLnRequest bool
HttpAllSupportsLowVersionHTTP bool
@@ -137,6 +140,8 @@ func (this *IndexAction) RunPost(params struct {
config.HTTPAll.AllowMismatchDomains = allowMismatchDomains
config.HTTPAll.AllowNodeIP = params.HttpAllAllowNodeIP
config.HTTPAll.DefaultDomain = params.HttpAllDefaultDomain
config.HTTPAll.NodeIPShowPage = params.HttpAllNodeIPShowPage
config.HTTPAll.NodeIPPageHTML = params.HttpAllNodeIPPageHTML
// HTTP All
config.HTTPAll.SupportsLowVersionHTTP = params.HttpAllSupportsLowVersionHTTP

View File

@@ -18,9 +18,9 @@
</td>
</tr>
<tr v-show="config.httpAll.matchDomainStrictly">
<td class="color-border">页面提示</td>
<td class="color-border">未绑定域名页面提示</td>
<td>
<textarea name="httpAllDomainMismatchActionContentHTML" v-model="httpAllDomainMismatchActionContentHTML"></textarea>
<textarea rows="3" name="httpAllDomainMismatchActionContentHTML" v-model="httpAllDomainMismatchActionContentHTML"></textarea>
<p class="comment">访问未绑定的域名时提示的文字可以使用HTML仅限于HTTP请求不适于用HTTPSHTTPS会提示证书错误</p>
</td>
</tr>
@@ -31,6 +31,14 @@
<p class="comment">允许这些域名不经过绑定就可以直接访问网站。</p>
</td>
</tr>
<tr v-show="config.httpAll.matchDomainStrictly">
<td class="color-border">默认域名</td>
<td>
<input type="text" name="httpAllDefaultDomain" v-model="config.httpAll.defaultDomain"/>
<p class="comment">例外域名或使用节点IP访问时使用的默认域名。</p>
</td>
</tr>
<tr v-show="config.httpAll.matchDomainStrictly">
<td class="color-border">允许使用节点IP访问</td>
<td>
@@ -39,10 +47,17 @@
</td>
</tr>
<tr v-show="config.httpAll.matchDomainStrictly">
<td class="color-border">默认域名</td>
<td class="color-border">访问节点IP显示自定义内容</td>
<td>
<input type="text" name="httpAllDefaultDomain" v-model="config.httpAll.defaultDomain"/>
<p class="comment">例外域名或使用节点IP访问时使用的默认域名</p>
<checkbox name="httpAllNodeIPShowPage" v-model="config.httpAll.nodeIPShowPage"></checkbox>
<p class="comment">选中后表示用户访问节点IP时显示自定义内容</p>
</td>
</tr>
<tr v-show="config.httpAll.matchDomainStrictly && config.httpAll.nodeIPShowPage">
<td class="color-border">访问节点IP自定义内容</td>
<td>
<textarea name="httpAllNodeIPPageHTML" v-model="config.httpAll.nodeIPPageHTML" rows="3" placeholder="访问节点IP时要显示的自定义内容"></textarea>
<p class="comment">访问节点IP时要显示的自定义内容支持HTML。</p>
</td>
</tr>
</table>