Support localhost

This commit is contained in:
Owen Schwartz 2025-01-04 22:33:25 -05:00
parent f7fe965fdf
commit d064d3c7b5
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
3 changed files with 4 additions and 7 deletions

View file

@ -23,7 +23,7 @@ const createTargetParamsSchema = z
const createTargetSchema = z
.object({
ip: z.string().ip(),
ip: z.string().ip().or(z.literal('localhost')),
method: z.string().min(1).max(10),
port: z.number().int().min(1).max(65535),
protocol: z.string().optional(),

View file

@ -19,7 +19,7 @@ const updateTargetParamsSchema = z
const updateTargetBodySchema = z
.object({
ip: z.string().ip().optional(), // for now we cant update the ip; you will have to delete
ip: z.string().ip().or(z.literal('localhost')).optional(), // for now we cant update the ip; you will have to delete
method: z.string().min(1).max(10).optional(),
port: z.number().int().min(1).max(65535).optional(),
enabled: z.boolean().optional()