v1.39.0
🚀 Features
gRPC Streaming Support
GoFr now supports all gRPC streaming types, unlocking full duplex communication capabilities:
- Server-side streaming
- Client-side streaming c
- Bidirectional streaming
Auto-generated handlers for streaming methods with built-in metrics and tracing support for all streaming calls
Note: Requires
gofr-cli v0.7.0or higher.
Refer to the examples to explore usage patterns.
Redirect Support in HTTP Handlers
Handlers can now trigger client redirects by returning a response.Redirect object:
import (
"gofr.dev/pkg/gofr"
"gofr.dev/pkg/gofr/http/response"
)
func main() {
app := gofr.New()
app.GET("/old-page", func(ctx *gofr.Context) (any, error) {
return response.Redirect{URL: "https://example.com/new-page"}, nil
})
app.Run()
}Use this for SEO-friendly permanent or temporary redirects from legacy URLs.
🛠 Improvements
1. TLS Support for Redis
Redis connections in GoFr can now be secured using TLS. This enhancement enables secure communication in production and enterprise deployments. Configuration is done via environment variables:
| Environment Variable | Description |
|---|---|
REDIS_TLS_ENABLED
| Set to "true" to enable TLS support
|
REDIS_TLS_CA_CERT_PATH
| File path to the CA certificate to verify Redis server identity |
REDIS_TLS_CERT_PATH
| File path to the client certificate (for mTLS connections) |
REDIS_TLS_KEY_PATH
| File path to the client private key (for mTLS connections) |