Download the PHP package tourze/http-forward-bundle without Composer
On this page you can find all versions of the php package tourze/http-forward-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tourze/http-forward-bundle
More information about tourze/http-forward-bundle
Files in tourze/http-forward-bundle
Package http-forward-bundle
Short Description Symfony Bundle for HTTP request forwarding with middleware support
License MIT
Informations about the package http-forward-bundle
HTTP Forward Bundle
中文
Symfony Bundle for HTTP request forwarding with middleware support
An enterprise-grade HTTP request forwarding component with complete forwarding capabilities, middleware system, load balancing, and health checks.
Core Features
- ✅ HTTP Request Forwarding - Support all HTTP methods (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS)
- ✅ Streaming Response - Full support for SSE (Server-Sent Events) and chunked transfer
- ✅ Middleware System - 7 built-in middlewares for request/response transformation
- ✅ Load Balancing - Multiple backend support with automatic healthy node selection
- ✅ Health Checks - Proactive backend health monitoring
- ✅ Retry Mechanism - Automatic retry with exponential backoff
- ✅ Fallback Handling - Return preset responses when backends are unavailable
- ✅ Access Control - API key authentication to protect proxy endpoints
- ✅ Visual Management - EasyAdmin backend with drag-and-drop middleware configuration
- ✅ Complete Logging - Record request/response for troubleshooting
Installation
Quick Start
1. Basic Configuration
Create forwarding rules via EasyAdmin:
- Visit
/admin - Navigate to HTTP Forward → Forward Rules
- Create a new rule with:
- Path Pattern:
/api/* - Backend URL:
https://api.example.com - Middlewares: Select required middlewares
- Path Pattern:
2. Use Forward Controller
Accessing /forward/api/users will automatically forward to the configured backend.
3. Programmatic Usage
Middleware System
Built-in Middlewares
| Middleware | Function | Use Case |
|---|---|---|
access_key_auth |
Access key authentication | Protect proxy endpoints, verify client identity |
auth_header |
Authorization header management | Add/replace Authorization header |
header_transform |
Request header transformation | Add, remove, rename request headers |
query_param |
Query parameter handling | Modify URL query parameters |
xml_to_json |
XML to JSON conversion | Response format transformation |
retry |
Retry mechanism | Automatically retry failed requests |
fallback |
Fallback handling | Return default response when backend unavailable |
Visual Configuration
Configure middlewares via drag-and-drop in EasyAdmin:
- Edit a forwarding rule
- In the Middlewares field:
- Select middleware from dropdown
- Click "Add" button
- Expand configuration form to fill parameters
- Drag to adjust execution order
See: Middleware Configuration Guide
Configuration Examples
Access Key Authentication
Authorization Header Management
Header Transformation
Retry Mechanism
Feature Details
Load Balancing
Support multiple backend configuration with automatic healthy node selection:
Health Checks
Use CLI command to check backend status:
Streaming Response
Automatically detect and support SSE streaming:
Request Logging
All forwarding requests are logged in ForwardLog entity:
- Request/response headers
- Response status code
- Execution time
- Error messages
- Backend node
View in EasyAdmin: HTTP Forward → Forward Logs
Configuration Reference
Entity Relationships
Use Cases
API Gateway
OpenAI Proxy
Works with open-ai-http-proxy-bundle to provide complete OpenAI API proxy functionality.
Microservice Routing
Route requests to different microservices based on path rules, supporting:
- Dynamic routing rules
- Request/response transformation
- Service degradation
- Traffic control
Testing
Documentation
- PRD (Product Requirements Document)
- Feature Request Document
- Middleware Configuration Guide
License
MIT License - See LICENSE file
Related Projects
Provides core forwarding capabilities as infrastructure component for tourze/open-ai-http-proxy-bundle.
Version: 1.0 Maintainer: Tourze Team
All versions of http-forward-bundle with dependencies
doctrine/dbal Version ^4.0
doctrine/doctrine-bundle Version ^2.13
doctrine/orm Version ^3.0
doctrine/persistence Version ^4.1
easycorp/easyadmin-bundle Version ^4
knplabs/knp-menu Version ^3.7
monolog/monolog Version ^3.1
psr/log Version ^3|^2|^1
symfony/config Version ^7.3
symfony/console Version ^7.3
symfony/dependency-injection Version ^7.3
symfony/doctrine-bridge Version ^7.3
symfony/event-dispatcher Version ^7.3
symfony/event-dispatcher-contracts Version ^3
symfony/form Version ^7.3
symfony/framework-bundle Version ^7.3
symfony/http-client Version ^7.3
symfony/http-client-contracts Version ^3.6
symfony/http-foundation Version ^7.3
symfony/http-kernel Version ^7.3
symfony/monolog-bridge Version ^7.3
symfony/property-access Version ^7.3
symfony/routing Version ^7.3
symfony/string Version ^7.3
symfony/twig-bundle Version ^7.3
symfony/validator Version ^7.3
symfony/yaml Version ^7.3
tourze/access-key-bundle Version 1.0.*
tourze/bundle-dependency Version 1.*
tourze/doctrine-indexed-bundle Version 1.0.*
tourze/doctrine-timestamp-bundle Version 1.1.*
tourze/easy-admin-enum-field-bundle Version 1.0.*
tourze/easy-admin-menu-bundle Version 1.0.*
tourze/enum-extra Version 1.0.*
tourze/load-balancer Version 1.0.*
tourze/symfony-cron-job-bundle Version 1.1.*
tourze/symfony-dependency-service-loader Version 1.0.*
tourze/symfony-routing-auto-loader-bundle Version 1.0.*