You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/01/16 02:06:13 UTC

[GitHub] [servicecomb-service-center] tianxiaoliang edited a comment on issue #620: 使用/v4/{project}/registry/microservices/{serviceId}/watcher无法收到回包

tianxiaoliang edited a comment on issue #620: 使用/v4/{project}/registry/microservices/{serviceId}/watcher无法收到回包
URL: https://github.com/apache/servicecomb-service-center/issues/620#issuecomment-574946635
 
 
   默认不允许跨app访问,把注册的app改为一致即可
   
   sc的这约束我也不是很喜欢,不过接口不可轻易变更啊,所以一直就没有改
   
   在go chassis端,我做了规避,给用户更好的体验
   
   ```go
   // GetRegistratorScope returns the Scope of service registry
   func GetRegistratorScope() string {
   	if GlobalDefinition.Cse.Service.Registry.Registrator.Scope == "" {
   		GlobalDefinition.Cse.Service.Registry.Registrator.Scope = common.ScopeFull
   	}
   	return GlobalDefinition.Cse.Service.Registry.Scope
   }
   ```
   
   
   ```go
   	if config.GetRegistratorScope() == common.ScopeFull {
   		microservice.Metadata["allowCrossApp"] = common.TRUE
   		service.ServiceDescription.Properties["allowCrossApp"] = common.TRUE
   	} else {
   		service.ServiceDescription.Properties["allowCrossApp"] = common.FALSE
   	}
   ```
   
   可以看出go chassis处理时 默认不配置就可以允许跨app访问了。
   
   可否对我们的service center文档进行些完善说明@little-cui 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services