mirror of
https://github.com/fosrl/pangolin.git
synced 2026-10-20 19:49:05 +02:00
fix merge
This commit is contained in:
@@ -11,21 +11,12 @@ function makeTarget(ip: string, siteType: string): TargetWithSite {
|
||||
return {
|
||||
targetId: 1,
|
||||
resourceId: 1,
|
||||
providerId: null,
|
||||
siteId: 1,
|
||||
ip,
|
||||
port: 8080,
|
||||
internalPort: 9000,
|
||||
method: "http",
|
||||
enabled: true,
|
||||
health: "healthy",
|
||||
path: null,
|
||||
pathMatchType: null,
|
||||
rewritePath: null,
|
||||
rewritePathType: null,
|
||||
priority: 100,
|
||||
mode: "http",
|
||||
authToken: null,
|
||||
site: {
|
||||
siteId: 1,
|
||||
type: siteType,
|
||||
|
||||
@@ -49,7 +49,7 @@ export function buildHttpLoadBalancerServers(targets: TargetWithSite[]) {
|
||||
target.site.type === "wireguard"
|
||||
) {
|
||||
return {
|
||||
url: `${target.method}://${formatEndpoint(target.ip, target.port)}`
|
||||
url: `${target.method}://${formatEndpoint(target.ip!, target.port!)}`
|
||||
};
|
||||
} else if (target.site.type === "newt") {
|
||||
const ip = target.site.subnet!.split("/")[0];
|
||||
@@ -124,7 +124,7 @@ export function buildTcpUdpLoadBalancerServers(targets: TargetWithSite[]) {
|
||||
target.site.type === "wireguard"
|
||||
) {
|
||||
return {
|
||||
address: formatEndpoint(target.ip, target.port)
|
||||
address: formatEndpoint(target.ip!, target.port!)
|
||||
};
|
||||
} else if (target.site.type === "newt") {
|
||||
const ip = target.site.subnet!.split("/")[0];
|
||||
|
||||
@@ -33,6 +33,8 @@ export type ResourceWithTargets = Pick<
|
||||
| "domainId"
|
||||
| "enabled"
|
||||
| "stickySession"
|
||||
| "loadBalancingStrategy"
|
||||
| "mtlsEnabled"
|
||||
| "tlsServerName"
|
||||
| "setHostHeader"
|
||||
| "enableProxy"
|
||||
|
||||
Reference in New Issue
Block a user