Skip to content

Instantly share code, notes, and snippets.

@jysperm
Last active June 20, 2019 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jysperm/de4af01d6be2888b2a69dc4088ba5d71 to your computer and use it in GitHub Desktop.
Save jysperm/de4af01d6be2888b2a69dc4088ba5d71 to your computer and use it in GitHub Desktop.

我们监测到从今天(06/20)下午开启各个地区陆续出现部分网络无法解析 leancloud.cn 以及 ***.***.lncld.net 域名的问题。我们正在全力和域名提供商沟通该问题的解决方案。在问题彻底解决之前,我们建议开发者更换域名作为临时解决方案。

华北节点

华北节点需要将所有的域名替换为 avoscloud.com

REST API

如果你使用的是 REST API,请直接将 api.leancloud.cn***.***.lncld.net 域名替换为 avoscloud.com

SDK

JavaScript SDK

存储 SDK

AV.init({
  // appId, appKey,
  serverURLs: 'https://avoscloud.com',
});

即时消息 SDK

new Realtime({
  // appId, appKey,
  server: {
    api: 'avoscloud.com',
    RTMRouter: 'avoscloud.com',
  },
};

iOS SDK

// 配置存储服务
[AVOSCloud setServerURLString:@"https://avoscloud.com" forServiceModule:AVServiceModuleAPI];
// 配置即时消息服务
[AVOSCloud setServerURLString:@"https://avoscloud.com" forServiceModule:AVServiceModuleRTM];
// 初始化
[AVOSCloud setApplicationId:APP_ID clientKey:APP_KEY];

Android SDK

// 配置存储服务
AVOSCloud.setServer(AVOSCloud.SERVER_TYPE.API, "https://avoscloud.com");
// 配置即时消息服务
AVOSCloud.setServer(AVOSCloud.SERVER_TYPE.RTM, "https://avoscloud.com");
// 初始化
AVOSCloud.initialize(this,APP_ID,APP_KEY);

.NET SDK

// 配置 Storage
AVClient.Initialize(new AVClient.Configuration
            {
                ApplicationId = "app-id",
                ApplicationKey = "app-key",
                ApiServer = "https://avoscloud.com"
            });
// 通过 router 配置聊天
var realtime = new AVRealtime(new AVRealtime.Configuration
           {
                ApplicationId = "app-id",
                ApplicationKey = "app-key",
                RTMRouter = new Uri("https://avoscloud.com")
           });

华东节点

华东节点的大部分服务不受此次事件的影响。部分用法需要按照以下方式替换域名:

JavaScript 即时通讯 SDK

const appId = 'YOUR_APP_ID';
new Realtime({
  // appId, appKey,
  server: {
    api: 'APPID前八位.api.lncldapi.com',
    RTMRouter: 'APPID前八位.rtm.lncldapi.com',
  },
};

美国节点

美国节点的大部分服务不受此次事件的影响。部分用法需要按照以下方式替换域名:

JavaScript 即时通讯 SDK

const appId = 'YOUR_APP_ID';
new Realtime({
  // appId, appKey,
  server: {
    api: 'APPID前八位.api.lncldglobal.com',
    RTMRouter: 'APPID前八位.rtm.lncldglobal.com',
  },
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment