mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-06 15:50:42 +00:00
Fix http resources not being pulled
This commit is contained in:
@@ -44,7 +44,8 @@ export async function getTraefikConfig(
|
|||||||
filterOutNamespaceDomains = false, // UNUSED BUT USED IN PRIVATE
|
filterOutNamespaceDomains = false, // UNUSED BUT USED IN PRIVATE
|
||||||
generateLoginPageRouters = false, // UNUSED BUT USED IN PRIVATE
|
generateLoginPageRouters = false, // UNUSED BUT USED IN PRIVATE
|
||||||
allowRawResources = true,
|
allowRawResources = true,
|
||||||
allowMaintenancePage = true // UNUSED BUT USED IN PRIVATE
|
allowMaintenancePage = true, // UNUSED BUT USED IN PRIVATE
|
||||||
|
allowBrowserGatewayResources = true
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
// Get resources with their targets and sites in a single optimized query
|
// Get resources with their targets and sites in a single optimized query
|
||||||
// Start from sites on this exit node, then join to targets and resources
|
// Start from sites on this exit node, then join to targets and resources
|
||||||
@@ -240,7 +241,7 @@ export async function getTraefikConfig(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resource.http) {
|
if (resource.mode === "http") {
|
||||||
if (!resource.domainId || !resource.fullDomain) {
|
if (!resource.domainId || !resource.fullDomain) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -572,7 +573,7 @@ export async function getTraefikConfig(
|
|||||||
serviceName
|
serviceName
|
||||||
].loadBalancer.serversTransport = transportName;
|
].loadBalancer.serversTransport = transportName;
|
||||||
}
|
}
|
||||||
} else {
|
} else if (resource.mode === "tcp" || resource.mode === "udp") {
|
||||||
// Non-HTTP (TCP/UDP) configuration
|
// Non-HTTP (TCP/UDP) configuration
|
||||||
if (!resource.enableProxy || !resource.proxyPort) {
|
if (!resource.enableProxy || !resource.proxyPort) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -493,16 +493,29 @@ export async function getTraefikConfig(
|
|||||||
const transportName = `${key}-transport`;
|
const transportName = `${key}-transport`;
|
||||||
const headersMiddlewareName = `${key}-headers-middleware`;
|
const headersMiddlewareName = `${key}-headers-middleware`;
|
||||||
|
|
||||||
|
logger.debug(
|
||||||
|
`Processing resource ${resource.name} with domain ${fullDomain} and ${targets.length} targets`
|
||||||
|
);
|
||||||
|
|
||||||
if (!resource.enabled) {
|
if (!resource.enabled) {
|
||||||
|
logger.debug(
|
||||||
|
`Resource ${resource.name} is disabled, skipping Traefik config`
|
||||||
|
);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resource.http) {
|
if (resource.mode == "http") {
|
||||||
if (!resource.domainId) {
|
if (!resource.domainId) {
|
||||||
|
logger.debug(
|
||||||
|
`Resource ${resource.name} does not have a domainId, skipping Traefik config`
|
||||||
|
);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!resource.fullDomain) {
|
if (!resource.fullDomain) {
|
||||||
|
logger.debug(
|
||||||
|
`Resource ${resource.name} does not have a fullDomain, skipping Traefik config`
|
||||||
|
);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -958,7 +971,7 @@ export async function getTraefikConfig(
|
|||||||
serviceName
|
serviceName
|
||||||
].loadBalancer.serversTransport = transportName;
|
].loadBalancer.serversTransport = transportName;
|
||||||
}
|
}
|
||||||
} else {
|
} else if (resource.mode == "tcp" || resource.mode == "udp") {
|
||||||
// Non-HTTP (TCP/UDP) configuration
|
// Non-HTTP (TCP/UDP) configuration
|
||||||
if (!resource.enableProxy) {
|
if (!resource.enableProxy) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user