增加自定义负载均衡规则,实现服务实例版本号隔离

This commit is contained in:
zlt
2019-09-04 12:08:38 +08:00
parent 1c17de3292
commit b060d8ee16
15 changed files with 254 additions and 5 deletions
@@ -105,6 +105,10 @@ layui.define(['config', 'layer'], function (exports) {
xhr.setRequestHeader('Authorization', 'bearer ' + token.access_token);
}
}
let isolationVersion = config.isolationVersion;
if (isolationVersion) {
xhr.setRequestHeader('z-l-t-version', isolationVersion);
}
}
});
},
@@ -19,6 +19,7 @@ layui.define(function (exports) {
base_server: apiUrl,
tableName: 'easyweb', // 存储表名
clientId: 'webApp', // 应用id
isolationVersion: '', // 隔离版本
clientSecret: 'webApp', // 应用秘钥
autoRender: false, // 窗口大小改变后是否自动重新渲染表格,解决layui数据表格非响应式的问题,目前实现的还不是很好,暂时关闭该功能
pageTabs: true, // 是否开启多标签