bugfix when create a proxy-host.conf can with more ports

This commit is contained in:
xialj 2023-07-31 23:52:27 +08:00
parent 4ebfb4247c
commit dec0ff31eb

View File

@ -234,7 +234,7 @@ const internalNginx = {
host.ipv6 = internalNginx.ipv6Enabled();
let listen_ports = [];
if(nice_host_type === 'proxy_host'){
host.domain_names.map(function (domain_name) {
if ( domain_name.indexOf(":") > 0 ){
listen_ports.push(parseInt(domain_name.substring(domain_name.indexOf(":")+1)));
@ -243,6 +243,7 @@ const internalNginx = {
if ( listen_ports.length > 0 ){
host.listen_ports = listen_ports;
}
}
locationsPromise.then(() => {
renderEngine