basic setup for rewriting requests to another path

This commit is contained in:
Pallavi Kumari
2025-09-28 11:25:11 +05:30
parent 70914e836f
commit 149a4b916b
8 changed files with 557 additions and 145 deletions

View File

@@ -32,7 +32,9 @@ const createTargetSchema = z
port: z.number().int().min(1).max(65535),
enabled: z.boolean().default(true),
path: z.string().optional().nullable(),
pathMatchType: z.enum(["exact", "prefix", "regex"]).optional().nullable()
pathMatchType: z.enum(["exact", "prefix", "regex"]).optional().nullable(),
rewritePath: z.string().optional().nullable(),
rewritePathType: z.enum(["exact", "prefix", "regex", "stripPrefix"]).optional().nullable() // NEW: rewrite path type
})
.strict();