package
Version:
v1.1.0
Opens a new window with list of versions in this module.
Published: Jun 3, 2020
License: MIT
Opens a new window with license information.
Imports: 13
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Gin 自带的中间件有很多种,可以在 https://github.com/gin-gonic/contrib 找到。
下面是一些常用的中间件
- RestGate:REST API 端点的安全身份验证
- gin-jwt:用于 Gin 框架的 JWT 中间件
- gin-sessions:基于 MongoDB 和 MySQL 的会话中间件
- gin-location:用于公开服务器主机名和方案的中间件
- gin-nice-recovery:异常错误恢复中间件,让您构建更好的用户体验
- gin-limit:限制同时请求,可以帮助解决高流量负载
- gin-oauth2:用于处理 OAuth2
- gin-template:简单易用的 Gin 框架 HTML/模板
- gin-redis-ip-limiter:基于 IP 地址的请求限制器
- gin-access-limit:通过指定允许的源 CIDR 表示法来访问控制中间件
- gin-session:Gin 的会话中间件
- gin-stats:轻量级且有用的请求指标中间件
- gin-session-middleware:一个高效,安全且易于使用的 Go 会话库
- ginception:漂亮的异常页面
- gin-inspector:用于调查 HTTP 请求的 Gin 中间件
Documentation
¶
Logging is a middleware function that logs the each request.
NoCache is a middleware function that appends headers
to prevent the client from caching the HTTP response.
Options is a middleware function that appends headers
for options requests and aborts then exits the middleware
chain and ends the request.
RequestID 透传Request-ID,如果没有则生成一个
Secure is a middleware function that appends security
and resource access headers.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.