Files
crewli/api/config/form_builder.php
bert.hausmans 25de407e14 feat(forms): add form_binding, form_subjects, form_filter_registry, form_builder configs
Groundwork for S2+ services. Entity Column Registry whitelists valid
Pattern A/C binding targets; subject-type registry enforces morph-map;
filter registry separates filterable columns from bindable ones; builder
config holds limits, webhook policy, captcha, retention, feature flags.
Adds dedicated 'webhooks' Redis queue connection (retry_after 120s).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 11:54:11 +02:00

75 lines
1.9 KiB
PHP

<?php
declare(strict_types=1);
/*
|--------------------------------------------------------------------------
| Form Builder — general configuration
|--------------------------------------------------------------------------
|
| Tunable limits, webhook policy, captcha, retention and feature flags for
| the universal form builder. See ARCH-FORM-BUILDER.md §22.7 for rationale.
|
*/
return [
'limits' => [
'max_fields_per_schema' => 100,
'max_filterable_fields_per_schema' => 20,
'max_options_per_field' => 100,
'max_submissions_per_public_schema_per_ip_per_hour' => 5,
],
'webhooks' => [
'allowlist_domains' => [],
'blocklist_ips' => [
'127.0.0.0/8',
'10.0.0.0/8',
'172.16.0.0/12',
'192.168.0.0/16',
'169.254.169.254/32',
],
'timeout_seconds' => 10,
'max_attempts' => 5,
],
'file_uploads' => [
'default_allowed_mime_types' => ['image/jpeg', 'image/png', 'image/webp', 'application/pdf'],
'default_max_size_mb' => 5,
],
'search_index' => [
'max_chars' => 10000,
],
'captcha' => [
'provider' => 'turnstile',
'site_key' => env('TURNSTILE_SITE_KEY'),
'secret_key' => env('TURNSTILE_SECRET_KEY'),
'required_for_purposes' => ['public_complaint', 'public_press_request'],
],
'public_submitter_ip_retention_days' => 30,
'user_profile_settings_whitelist' => [
'ui.theme',
'ui.sidebar_collapsed',
'ui.time_format',
'notifications.email_digest',
'notifications.shift_reminders',
'notifications.event_updates',
],
'custom_field_types' => [],
'validation_callbacks' => [],
'features' => [
'webhooks' => false, // dispatcher arrives in S6
'i18n_runtime' => false, // runtime resolution later
'retention_job' => false, // scheduler task later
],
];