在节点重新实现缓存策略和WAF策略

This commit is contained in:
刘祥超
2020-12-17 17:36:10 +08:00
parent 0e312f6707
commit 1ea63ab8c6
26 changed files with 151 additions and 129 deletions

View File

@@ -2,7 +2,7 @@ package nodes
import (
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeNode/internal/logs"
"github.com/TeaOSLab/EdgeNode/internal/remotelogs"
"github.com/TeaOSLab/EdgeNode/internal/rpc"
"net/http"
"path/filepath"
@@ -15,13 +15,13 @@ func (this *HTTPRequest) doACME() {
rpcClient, err := rpc.SharedRPC()
if err != nil {
logs.Error("RPC", "[ACME]rpc failed: "+err.Error())
remotelogs.Error("RPC", "[ACME]rpc failed: "+err.Error())
return
}
keyResp, err := rpcClient.ACMEAuthenticationRPC().FindACMEAuthenticationKeyWithToken(rpcClient.Context(), &pb.FindACMEAuthenticationKeyWithTokenRequest{Token: token})
if err != nil {
logs.Error("RPC", "[ACME]read key for token failed: "+err.Error())
remotelogs.Error("RPC", "[ACME]read key for token failed: "+err.Error())
return
}
if len(keyResp.Key) == 0 {