v1.35.2
·
79 commits
to development
since this release
Release - v1.35.2
🛠 Improvements
1. Kafka TLS Enhancements
-
Added support for configuring Kafka with TLS parameters, enabling seamless integration with Confluent Kafka SaaS and similar ecosystems.
Introduced the following configuration options:KAFKA_TLS_CERT_FILE : Path to the TLS certificate file. KAFKA_TLS_KEY_FILE : Path to the TLS key file. KAFKA_TLS_CA_CERT_FILE : Path to the TLS CA certificate file. KAFKA_TLS_INSECURE_SKIP_VERIFY : Boolean option to skip TLS certificate verification.
Note: All provided paths must be absolute. Check out our official documentation to learn more.
2. Static File Server Enhancements
-
If a requested file is missing, the server attempts to serve
404.html
with a404
status code. If404.html
is unavailable, it returns a404
status code. -
If the file being accessed lacks read permissions, the error is logged and an appropriate
500 Internal Server Error
status code and response body is returned.
🛠 Fixes
1. Middleware Execution Order
- Restored the original middleware execution order prior to Release v1.35.0. Standard middlewares (
logs
,traces
,metrics
,CORS
) are now executed before user-defined middlewares, ensuring consistent observability even when responses are handled early for e.g. in custom middlewares. - However, WebSocket connection upgrades necessarily take place after all middleware processing, maintaining compatibility with corresponding authentication flows introduced previously.
2. Kafka Security Protocol Configuration Fix
- Previously, SASL authentication failed in ecosystems like Confluent due to missing
security.protocol
support, causing errors like:SASL handshake failed: EOF
- Introduced
KAFKA_SECURITY_PROTOCOL
to explicitly define the security protocol for Kafka communication. Supported options include :PLAINTEXT
,SSL
,SASL_PLAINTEXT
,SASL_SSL
, ensuring seamless authentication. Check out official documentation to know more.
3. Redundant WriteHeader Calls
- Fixed redundant WriteHeader calls when custom middleware in the static file server set a status code, preventing log spam like:
http: superfluous response.WriteHeader call from gofr.dev/pkg/gofr/http/middleware.(*StatusResponseWriter).WriteHeader (logger.go:23)
- Headers are now written once—by either user-defined middleware or the framework handlers.