Skip to main content

Module middleware

Module middleware 

Source
Expand description

HTTP 中间件模块

提供常用的 HTTP 中间件实现。

Structs§

Compression
压缩中间件层
CompressionBuilder
压缩中间件构建器
CompressionConfig
压缩配置
CorsConfig
CORS 配置结构体
CorsLayer
Layer that applies the Cors middleware which adds headers for CORS.
RequestIdLayer
请求 ID 中间件层
TracingLayer
追踪中间件层

Enums§

CompressionAlgorithm
压缩算法类型

Functions§

cors_permissive
创建允许所有请求的 CORS 配置
cors_strict
创建严格模式的 CORS 配置