配置:修改host为域名

This commit is contained in:
luying
2022-01-04 19:33:26 +08:00
parent 0508077e44
commit b5ca618cef
5 changed files with 190 additions and 9 deletions
+18 -1
View File
@@ -30,6 +30,7 @@ import { resResult, genCode } from './app/pubUtils/util';
import { errlogger, infologger } from './app/util/logger';
import { connectThinkingData, getTire } from './app/services/sdkService';
import { loadGmDb } from './app/db';
const fs = require('fs');
const filePath = (_pinus as any).FILEPATH;
filePath.MASTER = '/config/master';
@@ -112,6 +113,22 @@ app.configure(ALL_ENVS, 'connector', function () {
});
});
// wss加密
// app.configure('sq1', 'connector', function() {
// app.set('connectorConfig',
// {
// connector: pinus.connectors.hybridconnector,
// heartbeat: 60,
// useDict: true,
// useProtobuf: true,
// ssl: {
// type: 'wss',
// key: fs.readFileSync('/usr/local/nginx/conf/cert/*.37wan.com.key'),
// cert: fs.readFileSync('/usr/local/nginx/conf/cert/*.37wan.com_with_chain.crt'),
// }
// });
// });
app.configure(ALL_ENVS, 'gate', function () {
app.set('connectorConfig',
{
@@ -236,7 +253,7 @@ if (app.isMaster()) {
app.event.on('add_servers', (server) => {
if(server.isGM != 'true') {
if(server.id != 'connector-server-gm') {
redisService.setConnectors(server);
}
})