Middleware

Third-party middleware extensions supported by Hertz.

hertz provides common middleware extensions such as CORS, JWT, Gzip, etc. More implementation details can be found in hertz-contrib projects.


CORS

Hertz provides implementation of CORS middleware.

JWT

Hertz provides an implementation of JWT.

Gzip Compress

Hertz provides an implementation of Gzip.

Internationalization

Hertz provides the middleware extension for internationalization (i18n).

Session Extension

Hertz provides an implementation of Session.

Pprof

Hertz provides the pprof extension to help users perform performance analysis on Hertz projects.

KeyAuth

Hertz provides the keyauth extension to help users achieve token authentication.

Swagger

Hertz middleware to automatically generate RESTful API documentation with Swagger 2.0.

Request ID

Hertz provides Request ID middleware that can operate on X-Request-ID.

access log

This middleware is used to hertz that logs HTTP request/response details.

Secure

Secure is an HTTP middleware from Hertz that checks HTTP requests to quickly secure access requests.

Sentry

Hertz integrates with the Sentry-Go SDK by using the middleware hertzsentry.

CSRF

Hertz provides CSRF middleware to help you prevent cross-site request forgery attacks.

Casbin

According to the user’s use scenario, we provide Casbin Middleware that adapted to Hertz.

ETag

Hertz provides Etag middleware that can operate on ETag.

Cache

Hertz provides the adaptation of cache, supporting multi-backend.

Paseto

This is the PASETO middleware for Hertz framework.


Last modified February 10, 2025 : Update engine.md (#1235) (1f28ebe)