mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
update blueprints
This commit is contained in:
@@ -107,7 +107,9 @@ export async function updateProxyResources(
|
||||
enabled: targetData.enabled,
|
||||
internalPort: internalPortToCreate,
|
||||
path: targetData.path,
|
||||
pathMatchType: targetData["path-match"]
|
||||
pathMatchType: targetData["path-match"],
|
||||
rewritePath: targetData.rewritePath,
|
||||
rewritePathType: targetData["rewrite-match"]
|
||||
})
|
||||
.returning();
|
||||
|
||||
@@ -327,7 +329,9 @@ export async function updateProxyResources(
|
||||
port: targetData.port,
|
||||
enabled: targetData.enabled,
|
||||
path: targetData.path,
|
||||
pathMatchType: targetData["path-match"]
|
||||
pathMatchType: targetData["path-match"],
|
||||
rewritePath: targetData.rewritePath,
|
||||
rewritePathType: targetData["rewrite-match"]
|
||||
})
|
||||
.where(eq(targets.targetId, existingTarget.targetId))
|
||||
.returning();
|
||||
|
||||
@@ -14,7 +14,9 @@ export const TargetSchema = z.object({
|
||||
enabled: z.boolean().optional().default(true),
|
||||
"internal-port": z.number().int().min(1).max(65535).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>;
|
||||
|
||||
@@ -183,7 +185,7 @@ export const ClientResourceSchema = z.object({
|
||||
"proxy-port": z.number().min(1).max(65535),
|
||||
"hostname": z.string().min(1).max(255),
|
||||
"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
|
||||
|
||||
Reference in New Issue
Block a user