调整了socket path路径

This commit is contained in:
wkj 2024-04-25 19:24:08 +08:00
parent 46cf0e9ab2
commit dfe86166c8
2 changed files with 6 additions and 4 deletions

View File

@ -144,7 +144,7 @@ async function startup(path, connector, omitWatchers, omitTimers, routine) {
if (nginx.port) {
url += `:${nginx.port}`;
}
url = concat(url, `${nginx.socketPath}`);
// url = concat(url, `/${nginx.socketPath}`);
}
else if (clusterInfo.usingCluster) {
url += `:${process.env.PM2_PORT || 8080}`;
@ -153,11 +153,12 @@ async function startup(path, connector, omitWatchers, omitTimers, routine) {
url += `:${port}`;
}
url = concat(url, DATA_SUBSCRIBER_NAMESPACE);
// 配置nginx的socketPath 需加在path上
router.get(connector.getSubscribePointRouter(), async (ctx) => {
const { response } = ctx;
response.body = {
url,
path: connector.getSubscribeRouter(),
path: nginx?.socketPath ? `/${nginx.socketPath}` : '' + connector.getSubscribeRouter(),
};
return;
});

View File

@ -164,7 +164,7 @@ export async function startup<ED extends EntityDict & BaseEntityDict, FrontCxt e
if (nginx.port) {
url += `:${nginx.port}`;
}
url = concat(url, `${nginx.socketPath}`);
// url = concat(url, `/${nginx.socketPath}`);
}
else if (clusterInfo.usingCluster){
url += `:${process.env.PM2_PORT || 8080}`;
@ -173,11 +173,12 @@ export async function startup<ED extends EntityDict & BaseEntityDict, FrontCxt e
url += `:${port}`;
}
url = concat(url, DATA_SUBSCRIBER_NAMESPACE);
// 配置nginx的socketPath 需加在path上
router.get(connector.getSubscribePointRouter(), async (ctx) => {
const { response } = ctx;
response.body = {
url,
path: connector.getSubscribeRouter(),
path: nginx?.socketPath ? `/${nginx.socketPath}` : '' + connector.getSubscribeRouter(),
};
return;
});