mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-02 16:56:39 +00:00
Merge pull request #1592 from Pallavikumarimdb/ordered-priority-in-path-routing-rules
Add ordered priority for path-based routing rules
This commit is contained in:
@@ -114,7 +114,8 @@ export async function updateProxyResources(
|
||||
path: targetData.path,
|
||||
pathMatchType: targetData["path-match"],
|
||||
rewritePath: targetData.rewritePath,
|
||||
rewritePathType: targetData["rewrite-match"]
|
||||
rewritePathType: targetData["rewrite-match"],
|
||||
priority: targetData.priority
|
||||
})
|
||||
.returning();
|
||||
|
||||
@@ -363,7 +364,8 @@ export async function updateProxyResources(
|
||||
path: targetData.path,
|
||||
pathMatchType: targetData["path-match"],
|
||||
rewritePath: targetData.rewritePath,
|
||||
rewritePathType: targetData["rewrite-match"]
|
||||
rewritePathType: targetData["rewrite-match"],
|
||||
priority: targetData.priority
|
||||
})
|
||||
.where(eq(targets.targetId, existingTarget.targetId))
|
||||
.returning();
|
||||
|
||||
@@ -33,7 +33,8 @@ export const TargetSchema = z.object({
|
||||
"path-match": z.enum(["exact", "prefix", "regex"]).optional().nullable(),
|
||||
healthcheck: TargetHealthCheckSchema.optional(),
|
||||
rewritePath: z.string().optional(),
|
||||
"rewrite-match": z.enum(["exact", "prefix", "regex", "stripPrefix"]).optional().nullable()
|
||||
"rewrite-match": z.enum(["exact", "prefix", "regex", "stripPrefix"]).optional().nullable(),
|
||||
priority: z.number().int().min(1).max(1000).optional().default(100)
|
||||
});
|
||||
export type TargetData = z.infer<typeof TargetSchema>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user