Skip to content

Commit

Permalink
check parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTrunk committed Jan 25, 2024
1 parent 16fe9e9 commit 5ebfad4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/services/application/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function getCustomConfigs(specifications) {
serverConfig: '',
enableH2: false,
mode: 'http',
check: true,
};

if (specifications.name.toLowerCase().includes('wordpress')) {
Expand All @@ -19,6 +20,10 @@ function getCustomConfigs(specifications) {
if (specifications.name.toLowerCase().includes('bittensor')) {
defaultConfig.mode = 'tcp';
}
if (specifications.name.toLowerCase().includes('palworld')) {
defaultConfig.mode = 'tcp';
defaultConfig.check = false;
}

const customConfigs = {
'31350.kmdsapactapi.kmdsapactapi': {
Expand Down
5 changes: 3 additions & 2 deletions src/services/haproxyTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,12 @@ backend ${domainUsed}backend
}
const apiPort = ip.split(':')[1] || 16127;
const cookieConfig = app.loadBalance || mode === 'tcp' ? '' : `cookie ${ip.split(':')[0]}:${app.port}`;
const isCheck = app.check ? 'check ' : '';
if (app.ssl) {
const h2Config = app.enableH2 ? `${h2Suffix} ` : '';
domainBackend += `\n server ${ip.split(':')[0]}:${apiPort} ${ip.split(':')[0]}:${app.port} check ${app.serverConfig} ssl verify none ${h2Config}${cookieConfig}`;
domainBackend += `\n server ${ip.split(':')[0]}:${apiPort} ${ip.split(':')[0]}:${app.port} ${isCheck}${app.serverConfig} ssl verify none ${h2Config}${cookieConfig}`;
} else {
domainBackend += `\n server ${ip.split(':')[0]}:${apiPort} ${ip.split(':')[0]}:${app.port} check ${app.serverConfig} ${cookieConfig}`;
domainBackend += `\n server ${ip.split(':')[0]}:${apiPort} ${ip.split(':')[0]}:${app.port} ${isCheck}${app.serverConfig} ${cookieConfig}`;
}
if (app.isRdata) {
if (mapOfNamesIps[app.name] && app.ips.includes(mapOfNamesIps[app.name])) { // use this ip as a main
Expand Down

0 comments on commit 5ebfad4

Please sign in to comment.