mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-02 02:28:04 +00:00
Force tcp and udp ports when http mode
This commit is contained in:
@@ -389,9 +389,10 @@ export async function createSiteResource(
|
||||
enabled,
|
||||
alias: alias ? alias.trim() : null,
|
||||
aliasAddress,
|
||||
tcpPortRangeString,
|
||||
udpPortRangeString,
|
||||
disableIcmp,
|
||||
tcpPortRangeString:
|
||||
mode == "http" ? "443,80" : tcpPortRangeString,
|
||||
udpPortRangeString: mode == "http" ? "" : udpPortRangeString,
|
||||
disableIcmp: disableIcmp || (mode == "http" ? true : false), // default to true for http resources, otherwise false
|
||||
domainId,
|
||||
subdomain: finalSubdomain,
|
||||
fullDomain
|
||||
@@ -496,7 +497,13 @@ export async function createSiteResource(
|
||||
`Created site resource ${newSiteResource.siteResourceId} for org ${orgId}`
|
||||
);
|
||||
|
||||
if (ssl && mode === "http" && domainId && fullDomain && build != "oss") {
|
||||
if (
|
||||
ssl &&
|
||||
mode === "http" &&
|
||||
domainId &&
|
||||
fullDomain &&
|
||||
build != "oss"
|
||||
) {
|
||||
await createCertificate(domainId, fullDomain, db);
|
||||
}
|
||||
|
||||
|
||||
@@ -440,9 +440,12 @@ export async function updateSiteResource(
|
||||
destinationPort,
|
||||
enabled,
|
||||
alias: alias ? alias.trim() : null,
|
||||
tcpPortRangeString,
|
||||
udpPortRangeString,
|
||||
disableIcmp,
|
||||
tcpPortRangeString:
|
||||
mode == "http" ? "443,80" : tcpPortRangeString,
|
||||
udpPortRangeString:
|
||||
mode == "http" ? "" : udpPortRangeString,
|
||||
disableIcmp:
|
||||
disableIcmp || (mode == "http" ? true : false), // default to true for http resources, otherwise false
|
||||
domainId,
|
||||
subdomain: finalSubdomain,
|
||||
fullDomain,
|
||||
|
||||
Reference in New Issue
Block a user