Expand description
Structs§
- Catch
Panic Layer - 重新导出 tower-http 的常用中间件
Layer that applies the
CatchPanicmiddleware that catches panics and converts them into500 Internal Serverresponses. - Compression
- 压缩中间件层
- Compression
Builder - 压缩中间件构建器
- Compression
Config - 压缩配置
- Cors
Config - CORS 配置结构体
- Cors
Layer - Layer that applies the
Corsmiddleware which adds headers for CORS. - Make
Request Uuid - 重新导出 tower-http 的常用中间件
A
MakeRequestIdthat generatesUUIDs. - Normalize
Path Config - 路径归一化配置
- Normalize
Path Layer - 重新导出 tower-http 的常用中间件
Layer that applies
NormalizePathwhich normalizes paths. - Request
IdLayer - 请求 ID 中间件层
- SetRequest
Header Layer - 重新导出 tower-http 的常用中间件
Layer that applies
SetRequestHeaderwhich adds a request header. - SetResponse
Header Layer - 重新导出 tower-http 的常用中间件
Layer that applies
SetResponseHeaderwhich adds a response header. - Timeout
Builder - 超时中间件构建器
- Timeout
Layer - 重新导出 tower-http 的常用中间件
Layer that applies the
Timeoutmiddleware which apply a timeout to requests. - Tracing
Layer - 追踪中间件层
Enums§
- Compression
Algorithm - 压缩算法类型
Functions§
- cors_
permissive - 创建允许所有请求的 CORS 配置
- cors_
strict - 创建严格模式的 CORS 配置