| 147 | |
| 148 | |
| 149 | class GZipConfig(BaseModel): |
| 150 | enabled: Annotated[ |
| 151 | bool, |
| 152 | Field(description="Enable GZip compression for API responses."), |
| 153 | ] = False |
| 154 | |
| 155 | minimum_size: Annotated[ |
| 156 | int, |
| 157 | Field( |
| 158 | description="Minimum response size (in bytes) before compression is applied." |
| 159 | ), |
| 160 | ] = 5000 |
| 161 | |
| 162 | compresslevel: Annotated[ |
| 163 | int, |
| 164 | Field(description="Compression level (1=fastest, 9=best compression)."), |
| 165 | ] = 3 |
| 166 | |
| 167 | |
| 168 | class ServerConfig(BaseSettings): |