Edge Optimization: Headers, Caching & Compression
Edge HTTP header rewriting, static resource proxy caching, and Brotli/Gzip response payload compression.
CheeseWAF provides edge acceleration capabilities at the reverse proxy layer to optimize response latency and reduce origin bandwidth consumption. Manage these settings visually under Edge in the Web console, or define them in configuration files under the edge block.
1. HTTP Response Header Rewriting
YAML
- Set Headers (
set): Appends custom tracking or security headers (e.g.,X-Content-Type-Options: nosniff). - Strip Headers (
delete): Removes sensitive internal origin response headers (such asServer,X-Powered-By, or internal debug tokens) before responses reach the public internet.
2. Static Asset Proxy Caching
YAML
- Path Targeting: Specify path prefixes in
path_prefixesstrictly for purely static assets (e.g., CSS, JS, fonts, images). - Security Caution: Never configure caching rules for authenticated dynamic API endpoints or personalized HTML pages.
3. High-Efficiency Response Compression
YAML
- Compression Algorithms: Supports Brotli (
br) and standard Gzip (gzip) algorithms. - Trigger Conditions: Responses are compressed only when payload sizes exceed
min_bytes(e.g., 1024 bytes) and match defined MIME types (text/*,application/json,application/javascript,image/svg+xml).