mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-08 02:24:32 +00:00
feat(healthchecks): add command health checks with input validation
Add support for command-based health checks in addition to HTTP-based checks: - New health_check_type field supporting 'http' and 'cmd' values - New health_check_command field with strict regex validation - Updated allowedFields in create_application and update_by_uuid endpoints - Validation rules include max 1000 characters and safe character whitelist - Added feature tests for health check API endpoints - Added unit tests for GithubAppPolicy and SharedEnvironmentVariablePolicy
This commit is contained in:
@@ -104,6 +104,8 @@ function sharedDataApplications()
|
||||
'base_directory' => 'string|nullable',
|
||||
'publish_directory' => 'string|nullable',
|
||||
'health_check_enabled' => 'boolean',
|
||||
'health_check_type' => 'string|in:http,cmd',
|
||||
'health_check_command' => ['nullable', 'string', 'max:1000', 'regex:/^[a-zA-Z0-9 \-_.\/:=@,+]+$/'],
|
||||
'health_check_path' => ['string', 'regex:#^[a-zA-Z0-9/\-_.~%]+$#'],
|
||||
'health_check_port' => 'integer|nullable|min:1|max:65535',
|
||||
'health_check_host' => ['string', 'regex:/^[a-zA-Z0-9.\-_]+$/'],
|
||||
|
||||
Reference in New Issue
Block a user