mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-07 03:06:40 +00:00
update blueprints
This commit is contained in:
@@ -107,7 +107,9 @@ export async function updateProxyResources(
|
|||||||
enabled: targetData.enabled,
|
enabled: targetData.enabled,
|
||||||
internalPort: internalPortToCreate,
|
internalPort: internalPortToCreate,
|
||||||
path: targetData.path,
|
path: targetData.path,
|
||||||
pathMatchType: targetData["path-match"]
|
pathMatchType: targetData["path-match"],
|
||||||
|
rewritePath: targetData.rewritePath,
|
||||||
|
rewritePathType: targetData["rewrite-match"]
|
||||||
})
|
})
|
||||||
.returning();
|
.returning();
|
||||||
|
|
||||||
@@ -327,7 +329,9 @@ export async function updateProxyResources(
|
|||||||
port: targetData.port,
|
port: targetData.port,
|
||||||
enabled: targetData.enabled,
|
enabled: targetData.enabled,
|
||||||
path: targetData.path,
|
path: targetData.path,
|
||||||
pathMatchType: targetData["path-match"]
|
pathMatchType: targetData["path-match"],
|
||||||
|
rewritePath: targetData.rewritePath,
|
||||||
|
rewritePathType: targetData["rewrite-match"]
|
||||||
})
|
})
|
||||||
.where(eq(targets.targetId, existingTarget.targetId))
|
.where(eq(targets.targetId, existingTarget.targetId))
|
||||||
.returning();
|
.returning();
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ export const TargetSchema = z.object({
|
|||||||
enabled: z.boolean().optional().default(true),
|
enabled: z.boolean().optional().default(true),
|
||||||
"internal-port": z.number().int().min(1).max(65535).optional(),
|
"internal-port": z.number().int().min(1).max(65535).optional(),
|
||||||
path: z.string().optional(),
|
path: z.string().optional(),
|
||||||
"path-match": z.enum(["exact", "prefix", "regex"]).optional().nullable()
|
"path-match": z.enum(["exact", "prefix", "regex"]).optional().nullable(),
|
||||||
|
rewritePath: z.string().optional(),
|
||||||
|
"rewrite-match": z.enum(["exact", "prefix", "regex", "stripPrefix"]).optional().nullable()
|
||||||
});
|
});
|
||||||
export type TargetData = z.infer<typeof TargetSchema>;
|
export type TargetData = z.infer<typeof TargetSchema>;
|
||||||
|
|
||||||
@@ -183,7 +185,7 @@ export const ClientResourceSchema = z.object({
|
|||||||
"proxy-port": z.number().min(1).max(65535),
|
"proxy-port": z.number().min(1).max(65535),
|
||||||
"hostname": z.string().min(1).max(255),
|
"hostname": z.string().min(1).max(255),
|
||||||
"internal-port": z.number().min(1).max(65535),
|
"internal-port": z.number().min(1).max(65535),
|
||||||
enabled: z.boolean().optional().default(true)
|
enabled: z.boolean().optional().default(true)
|
||||||
});
|
});
|
||||||
|
|
||||||
// Schema for the entire configuration object
|
// Schema for the entire configuration object
|
||||||
|
|||||||
Reference in New Issue
Block a user