Reverse Proxy
The reverse proxy handler forwards incoming HTTP requests to an upstream server. This is useful for integrating external web applications hosted on the same machine or network.
Configuration
sites:
- domain: "api.example.com"
proxy: "http://localhost:3000"
Requests to api.example.com are forwarded to http://localhost:3000, preserving the original request path and query string.
How It Works
- ZyveraWeb receives an HTTP request on the proxy domain.
- The request is forwarded to the upstream server using Java's HTTP client.
- The upstream response is relayed back to the client.
The proxy also injects standard forwarding headers:
X-Forwarded-For— Client IP addressX-Forwarded-Host— OriginalHostheader from the clientX-Forwarded-Proto—httporhttpsdepending on the connection
Hop-by-hop headers (like Connection and Transfer-Encoding) are automatically stripped.
Use Cases
- External web app — Proxy to a web application running on another port.
- Legacy service — Route specific domains to older services.
- Microservices — Split functionality across multiple backend processes.
Example: Multiple Proxied Services
sites:
- domain: "api.example.com"
proxy: "http://localhost:3000"
- domain: "admin.example.com"
proxy: "http://localhost:8081"
- domain: "grafana.example.com"
proxy: "http://localhost:3001"
No comments to display
No comments to display