fix: batch 5 — input validation tightening + health check endpoint
- z.any() replaced with z.record(z.string()) on webhook headers
- availabilityJson typed with z.array(z.object({ start, end }))
- Frontend webhook headers converted from array to Record before API call
- Docker HEALTHCHECK added to Dockerfile (health endpoint already existed)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -210,11 +210,16 @@ export default function WebhooksPage() {
|
||||
return
|
||||
}
|
||||
|
||||
const filteredHeaders = formData.headers.filter((h) => h.key)
|
||||
const headersRecord = filteredHeaders.length > 0
|
||||
? Object.fromEntries(filteredHeaders.map((h) => [h.key, h.value]))
|
||||
: undefined
|
||||
|
||||
const payload = {
|
||||
name: formData.name,
|
||||
url: formData.url,
|
||||
events: formData.events,
|
||||
headers: formData.headers.filter((h) => h.key) as Record<string, string>[] | undefined,
|
||||
headers: headersRecord,
|
||||
maxRetries: formData.maxRetries,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user