集群服务设置增加“支持低版本HTTP”选项

This commit is contained in:
GoEdgeLab
2023-04-01 09:51:44 +08:00
parent 0e6b36af4f
commit f43d935a5c
3 changed files with 17 additions and 0 deletions

View File

@@ -78,6 +78,8 @@ func (this *IndexAction) RunPost(params struct {
HttpAllAllowNodeIP bool HttpAllAllowNodeIP bool
HttpAllDefaultDomain string HttpAllDefaultDomain string
HttpAllSupportsLowVersionHTTP bool
HttpAccessLogEnableRequestHeaders bool HttpAccessLogEnableRequestHeaders bool
HttpAccessLogEnableResponseHeaders bool HttpAccessLogEnableResponseHeaders bool
HttpAccessLogCommonRequestHeadersOnly bool HttpAccessLogCommonRequestHeadersOnly bool
@@ -134,6 +136,9 @@ func (this *IndexAction) RunPost(params struct {
config.HTTPAll.AllowNodeIP = params.HttpAllAllowNodeIP config.HTTPAll.AllowNodeIP = params.HttpAllAllowNodeIP
config.HTTPAll.DefaultDomain = params.HttpAllDefaultDomain config.HTTPAll.DefaultDomain = params.HttpAllDefaultDomain
// HTTP All
config.HTTPAll.SupportsLowVersionHTTP = params.HttpAllSupportsLowVersionHTTP
// 访问日志 // 访问日志
config.HTTPAccessLog.EnableRequestHeaders = params.HttpAccessLogEnableRequestHeaders config.HTTPAccessLog.EnableRequestHeaders = params.HttpAccessLogEnableRequestHeaders
config.HTTPAccessLog.EnableResponseHeaders = params.HttpAccessLogEnableResponseHeaders config.HTTPAccessLog.EnableResponseHeaders = params.HttpAccessLogEnableResponseHeaders

View File

@@ -157,6 +157,7 @@ func (this *ClusterHelper) createSettingMenu(cluster *pb.NodeCluster, info *pb.F
"name": "服务设置", "name": "服务设置",
"url": "/clusters/cluster/settings/global-server-config?clusterId=" + clusterId, "url": "/clusters/cluster/settings/global-server-config?clusterId=" + clusterId,
"isActive": selectedItem == "globalServerConfig", "isActive": selectedItem == "globalServerConfig",
"isOn": true,
}) })
items = append(items, maps.Map{ items = append(items, maps.Map{

View File

@@ -122,6 +122,17 @@
</tr> </tr>
</table> </table>
<h4>其他</h4>
<table class="ui table definition selectable">
<tr>
<td class="title">支持低版本HTTP</td>
<td>
<checkbox name="httpAllSupportsLowVersionHTTP" v-model="config.httpAll.supportsLowVersionHTTP"></checkbox>
<p class="comment">选中后表示支持HTTP/1.0、HTTP/0.9等低于HTTP/1.1版本的HTTP协议。低版本HTTP协议不支持分段传输内容且无法保持连接对系统性能有严重的负面影响。建议只有在你的用户正在使用非常老旧的设备时才启用此选项。</p>
</td>
</tr>
</table>
<submit-btn></submit-btn> <submit-btn></submit-btn>
</form> </form>
</div> </div>