diff --git a/internal/web/actions/default/servers/server/settings/https/index.go b/internal/web/actions/default/servers/server/settings/https/index.go index 841c25df..8b93b759 100644 --- a/internal/web/actions/default/servers/server/settings/https/index.go +++ b/internal/web/actions/default/servers/server/settings/https/index.go @@ -6,7 +6,6 @@ import ( "github.com/TeaOSLab/EdgeAdmin/internal/oplogs" "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/serverutils" - "github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs" "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb" "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs" "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/sslconfigs" @@ -87,26 +86,15 @@ func (this *IndexAction) RunGet(params struct { } // 当前集群是否支持HTTP/3 - // TODO 检查当前服务所属用户是否支持HTTP/3 if server.NodeCluster == nil { this.ErrorPage(errors.New("no node cluster for the server")) return } - http3PolicyResp, err := this.RPC().NodeClusterRPC().FindNodeClusterHTTP3Policy(this.AdminContext(), &pb.FindNodeClusterHTTP3PolicyRequest{NodeClusterId: server.NodeCluster.Id}) + supportsHTTP3, err := this.checkSupportsHTTP3(server.NodeCluster.Id) if err != nil { this.ErrorPage(err) return } - var supportsHTTP3 = false - if len(http3PolicyResp.Http3PolicyJSON) > 0 { - var http3Policy = nodeconfigs.NewHTTP3Policy() - err = json.Unmarshal(http3PolicyResp.Http3PolicyJSON, http3Policy) - if err != nil { - this.ErrorPage(err) - return - } - supportsHTTP3 = http3Policy.IsOn - } this.Data["serverType"] = server.Type this.Data["httpsConfig"] = maps.Map{ diff --git a/internal/web/actions/default/servers/server/settings/https/index_ext.go b/internal/web/actions/default/servers/server/settings/https/index_ext.go new file mode 100644 index 00000000..940aac9d --- /dev/null +++ b/internal/web/actions/default/servers/server/settings/https/index_ext.go @@ -0,0 +1,8 @@ +// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn . +//go:build !plus + +package https + +func (this *IndexAction) checkSupportsHTTP3(clusterId int64) (bool, error) { + return false, nil +}