fly 2 năm trước cách đây
mục cha
commit
e32aac98f0
2 tập tin đã thay đổi với 10 bổ sung1 xóa
  1. 1 1
      src/Plugin/TokenVerifyPluginService.cs
  2. 9 0
      src/WingServer.cs

+ 1 - 1
src/Plugin/TokenVerifyPluginService.cs

@@ -86,7 +86,7 @@ namespace WingCloudServer.Plugin
             var dataLength = (int)context.GetRequestContentLength();
             var requests = JsonRpcCodec.DecodeRequestsAsync(requestData, new System.Threading.CancellationToken(), dataLength).Result;
             var apiName = $"{context.GetRequestPath().Trim('/')}/{requests[0].Method.Trim('/')}";
-            if (context.GetRequestPath() != "/IAuthenticationService" && context.GetRequestPath() != "/IMasterInteractionCenterService" && !NotValidationRequiredList.Contains(apiName)&&!context.GetRequestPath().Contains("IDynamicSlaveService") )
+            if (context.GetRequestPath() != "/IAuthenticationService" && context.GetRequestPath() != "/IMasterInteractionCenterService"&& context.GetRequestPath() != "/ILockService" && !NotValidationRequiredList.Contains(apiName)&&!context.GetRequestPath().Contains("IDynamicSlaveService") )
             {
                 var tokenRequest = new ValidateTokenRequest();
                 try

+ 9 - 0
src/WingServer.cs

@@ -170,6 +170,9 @@ namespace WingCloudServer
                     var masterInteractionCenterService = new MasterInteractionCenterService();
                     _rpcHttpServer.RegisterService(typeof(IMasterInteractionCenterService), masterInteractionCenterService);
                     masterInteractionCenterService.Load(_rpcClientPool);
+                    var lockService = new LockService();
+                    _rpcHttpServer.RegisterService(typeof(ILockService), lockService);
+                    lockService.Load(_rpcClientPool);
                 }
                 else
                 {
@@ -345,6 +348,12 @@ namespace WingCloudServer
                         Url = ConfigurationManager.MasterUrl
                     };
                     resList.Add(serviceInfo);
+                    var lockServiceInfo = new RemoteServiceInfo()
+                    {
+                        ServiceName = "ILockService",
+                        Url = ConfigurationManager.MasterUrl
+                    };
+                    resList.Add(lockServiceInfo);
                 }
             }
             var remoteConfig = ConfigurationManager.GetParammeter<StringParameter>("Services", "Remote").Value;