From d27b7c8fa1c81b8dd5109f36efb246795c70b5e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Mon, 7 Aug 2023 19:55:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=81=E8=AE=B8=E7=94=A8=E6=88=B7=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E8=8E=B7=E5=8F=96=E7=BC=93=E5=AD=98=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E4=BF=A1=E6=81=AFAPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/rpc/services/service_http_cache_policy.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/rpc/services/service_http_cache_policy.go b/internal/rpc/services/service_http_cache_policy.go index ad2b30f1..b5affa36 100644 --- a/internal/rpc/services/service_http_cache_policy.go +++ b/internal/rpc/services/service_http_cache_policy.go @@ -187,7 +187,7 @@ func (this *HTTPCachePolicyService) FindEnabledHTTPCachePolicyConfig(ctx context // FindEnabledHTTPCachePolicy 查找单个缓存策略信息 func (this *HTTPCachePolicyService) FindEnabledHTTPCachePolicy(ctx context.Context, req *pb.FindEnabledHTTPCachePolicyRequest) (*pb.FindEnabledHTTPCachePolicyResponse, error) { - _, err := this.ValidateAdmin(ctx) + _, _, err := this.ValidateAdminAndUser(ctx, false) if err != nil { return nil, err } @@ -202,9 +202,10 @@ func (this *HTTPCachePolicyService) FindEnabledHTTPCachePolicy(ctx context.Conte return &pb.FindEnabledHTTPCachePolicyResponse{HttpCachePolicy: nil}, nil } return &pb.FindEnabledHTTPCachePolicyResponse{HttpCachePolicy: &pb.HTTPCachePolicy{ - Id: int64(policy.Id), - Name: policy.Name, - IsOn: policy.IsOn, + Id: int64(policy.Id), + Name: policy.Name, + IsOn: policy.IsOn, + MaxBytesJSON: policy.MaxSize, }}, nil }