网站设置增加是否支持${serverAddr}选项

This commit is contained in:
GoEdgeLab
2023-08-25 15:31:08 +08:00
parent 1f12e49d75
commit 53fdfd987f
2 changed files with 9 additions and 0 deletions

View File

@@ -90,6 +90,7 @@ func (this *IndexAction) RunPost(params struct {
HttpAllDefaultDomain string
HttpAllNodeIPPageHTML string
HttpAllNodeIPShowPage bool
HttpAllEnableServerAddrVariable bool
HttpAllServerName string
HttpAllSupportsLowVersionHTTP bool
@@ -167,6 +168,7 @@ func (this *IndexAction) RunPost(params struct {
config.HTTPAll.SupportsLowVersionHTTP = params.HttpAllSupportsLowVersionHTTP
config.HTTPAll.MatchCertFromAllServers = params.HttpAllMatchCertFromAllServers
config.HTTPAll.ForceLnRequest = params.HttpAllForceLnRequest
config.HTTPAll.EnableServerAddrVariable = params.HttpAllEnableServerAddrVariable
// 访问日志
config.HTTPAccessLog.IsOn = params.HttpAccessLogIsOn

View File

@@ -181,6 +181,13 @@
<p class="comment">选中后所有请求优先发送到L2或者更高级别节点。默认不开启的情况下只有可以缓存的内容请求才会发送到L2或者更高级别节点。</p>
</td>
</tr>
<tr>
<td>支持${serverAddr}变量</td>
<td>
<checkbox name="httpAllEnableServerAddrVariable" v-model="config.httpAll.enableServerAddrVariable"></checkbox>
<p class="comment">支持在自定义页面中使用<code-label>${serverAddr}</code-label>变量,表示访客当前正在访问的服务器地址。</p>
</td>
</tr>
</table>
<submit-btn></submit-btn>