coolify/app/Http/Controllers/Api
Andras Bacsai 4706bc23aa Refactor: Centralize service application prerequisites
Refactors the Appwrite and Beszel service-specific application settings
to use a centralized constant-based approach, following the same pattern
as NEEDS_TO_CONNECT_TO_PREDEFINED_NETWORK.

Changes:
- Added NEEDS_TO_DISABLE_GZIP constant for services requiring gzip disabled
- Added NEEDS_TO_DISABLE_STRIPPREFIX constant for services requiring stripprefix disabled
- Created applyServiceApplicationPrerequisites() helper function in bootstrap/helpers/services.php
- Updated all service creation flows to use the centralized helper:
  * app/Livewire/Project/Resource/Create.php (web handler)
  * app/Http/Controllers/Api/ServicesController.php (API handler - BUG FIX)
  * app/Livewire/Project/New/DockerCompose.php (custom compose handler)
  * app/Http/Controllers/Api/ApplicationsController.php (API custom compose handler)
- Added comprehensive unit tests for the new helper function

Benefits:
- Single source of truth for service prerequisites
- DRY - eliminates code duplication between web and API handlers
- Fixes bug where API-created services didn't get prerequisites applied
- Easy to extend for future services (just edit the constant)
- More maintainable and testable

Related commits: 3a94f1ea1 (Beszel), 02b18c86e (Appwrite)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 16:47:09 +01:00
..
ApplicationsController.php Refactor: Centralize service application prerequisites 2025-11-28 16:47:09 +01:00
DatabasesController.php Merge pull request #7002 from W8jonas/fix/api-destination-uuid-databases 2025-11-01 13:46:47 +01:00
DeployController.php Changes auto-committed by Conductor 2025-10-16 11:01:58 +02:00
GithubController.php Changes auto-committed by Conductor 2025-10-16 13:19:05 +02:00
OpenApi.php fix: missing 422 error code in openapi spec 2025-10-12 14:20:45 +02:00
OtherController.php fix: missing 422 error code in openapi spec 2025-10-12 14:20:45 +02:00
ProjectController.php fix: missing 422 error code in openapi spec 2025-10-12 14:20:45 +02:00
ResourcesController.php feat(auth): implement comprehensive authorization checks across API controllers 2025-08-23 18:51:10 +02:00
SecurityController.php fix: missing 422 error code in openapi spec 2025-10-12 14:20:45 +02:00
ServersController.php Merge branch 'next' into fix/openapi 2025-10-13 10:42:05 +02:00
ServicesController.php Refactor: Centralize service application prerequisites 2025-11-28 16:47:09 +01:00
TeamController.php fix: hide sensitive email change fields in team member responses 2025-09-18 00:40:09 +08:00