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:
2026-03-07 18:26:28 +01:00
parent a68ec3fb45
commit 1ebdf5f9c9
4 changed files with 13 additions and 5 deletions

View File

@@ -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,
}