Webber is a modern, high-performance Go web server inspired by Nginx, with support for static file hosting (optimized for Vue.js, React, Angular, and other SPA builds), reverse proxying, WebSocket, rate limiting, gzip compression, in-memory caching, HTTP/2, and TLS.
- Logging Middleware: Logs every HTTP request and response time.
- Rate Limiting: Per-client IP request limits; configure via
RateLimitRPSandRateLimitBurst. - Gzip Compression: Automatic gzip for clients that support it.
- URL Rewriting: Example:
/old/exampleredirects to/new/example. - Reverse Proxy & Load Balancing: Round-robin proxying to backend services with nginx-like headers.
- Nginx-Style Reverse Proxy Mode: Simple single-line configuration to proxy all requests to a backend (like Next.js, Node.js, etc.).
- WebSocket Support: Real-time, bidirectional communication (
/wsendpoint). - Static File Serving with Caching: Efficiently serves static assets (SPA-ready), with in-memory caching.
- HTTP/2 and TLS: Secure, high-performance communication by default.
- SPA Routing Support: Unmatched routes serve
index.htmlfor client-side navigation (Vue.js, React, Angular, etc.).
Webber now supports nginx-style reverse proxy configuration with proper header forwarding.
To proxy all requests to a backend service (e.g., Next.js running on port 3000):
{
"port": "443",
"static_dir": "./static",
"proxy_mode": true,
"proxy_backend": "http://localhost:3000",
"rate_limit_rps": 10.0,
"rate_limit_burst": 20,
"cache_ttl_seconds": 300
}This is equivalent to the Caddy configuration:
example.com {
reverse_proxy localhost:3000
}
When using reverse proxy mode, Webber automatically sets the following headers (like nginx):
Host: The original host headerX-Real-IP: The client's real IP addressX-Forwarded-For: Chain of proxied IPsX-Forwarded-Proto: Original protocol (http/https)X-Forwarded-Host: Original host requested by the client
For load balancing across multiple backends:
{
"port": "443",
"static_dir": "./static",
"proxy_mode": true,
"proxy_targets": ["http://localhost:8081", "http://localhost:8082"],
"rate_limit_rps": 10.0,
"rate_limit_burst": 20,
"cache_ttl_seconds": 300
}For full documentation, visit the Webber Documentation website.
Contributions, bug reports, and feature requests are highly welcome! Please feel free to open a Pull Request (PR) or submit an issue on the GitHub repository.
Built in Eswatini with ❤️ by ElectronSz