mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-31 15:09:39 +02:00
Fix traefik config
This commit is contained in:
parent
d548563e65
commit
d771317e3f
1 changed files with 2 additions and 12 deletions
|
@ -7,16 +7,6 @@ import config from "@server/lib/config";
|
|||
import { orgs, resources, sites, Target, targets } from "@server/db";
|
||||
import { build } from "@server/build";
|
||||
|
||||
// Extended Target interface that includes site information
|
||||
interface TargetWithSite extends Target {
|
||||
site: {
|
||||
siteId: number;
|
||||
type: string;
|
||||
subnet: string | null;
|
||||
exitNodeId: number | null;
|
||||
};
|
||||
}
|
||||
|
||||
let currentExitNodeId: number;
|
||||
const redirectHttpsMiddlewareName = "redirect-to-https";
|
||||
const badgerMiddlewareName = "badger";
|
||||
|
@ -134,7 +124,7 @@ export async function getTraefikConfig(exitNodeId: number): Promise<any> {
|
|||
or(
|
||||
eq(sites.exitNodeId, currentExitNodeId),
|
||||
isNull(sites.exitNodeId)
|
||||
)
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -201,7 +191,7 @@ export async function getTraefikConfig(exitNodeId: number): Promise<any> {
|
|||
};
|
||||
|
||||
for (const resource of allResources) {
|
||||
const targets = resource.targets as Target[];
|
||||
const targets = resource.targets;
|
||||
const site = resource.site;
|
||||
|
||||
const routerName = `${resource.resourceId}-router`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue