v0.39.0
This commit is contained in:
1 parent
5e43752041
commit
15425fb803
34 files changed
+1423
-89
No files matched your search
+7
-1
@@ -9,6 +9,12 @@ The **Static & diagnostics** subtab provides **Ignore request cookies for static
|
||||
|
||||
**Safety requirement:** use both options only when the complete static response (body **and headers**) is identical for all visitors regardless of Cookie. `Vary: Cookie` is a declaration that content may vary, so overriding it on a genuinely session-dependent file can expose one user's cached variant to another. RustProxy applies this override only to responses with an explicit `Cache-Control: public` directive, positive remaining freshness (without mandatory revalidation) and no `Set-Cookie`, `private`, `no-store` or invalid Vary. A zero-TTL response, including `public` with no configured fallback TTL, retains `Vary: Cookie` even if it can be stored for later revalidation. If the response is not cacheable, `Vary: Cookie` is passed through unchanged. Do not enable this optimization for user-specific downloads, generated PDFs, account JSON, or any path where Flask or another origin changes content according to a session cookie; prefer removing the needless `Vary: Cookie` at the origin where possible.
|
||||
|
||||
### CDN security cookies (opt-in VCL template)
|
||||
|
||||
The cache rules template menu now includes **CDN technical cookies** for Cloudflare (`__cf_bm`, `cf_clearance`, `_cfuvid`, `__cfruid`, `__cfseq`) and Akamai (`_abck`, `ak_bmsc`, `bm_sz`, `bm_sv`). It bypasses non-GET/HEAD methods, restricted application paths and `Authorization`. It strips the entire Cookie header **only if all Cookie fields contain allowlisted technical cookies**, and bypasses any request with a remaining Cookie (for example `session`, `wordpress_logged_in_*`, CSRF tokens or other personalized cookies). The source equivalent is [`examples/vcl/cdn-technical-cookies.vcl`](../examples/vcl/cdn-technical-cookies.vcl). Import it only after reviewing warnings; enable the graphical template only on tested public Vhosts. Some challenge cookies (especially `cf_clearance`, `_abck` and `ak_bmsc`) are important to specific origin/CDN configurations; removing them can break a challenge flow. **This is not turned on automatically for existing Vhosts.**
|
||||
|
||||
**Do not extend** `Ignore Vary: Cookie for public static assets` to a general "Ignore Vary" control. `Accept-Encoding`, `Accept-Language`, `Accept`, `Origin`, `User-Agent` and custom response-specific dimensions can change bytes, permissions or CORS headers. Keep the response's actual dimensions and use the existing safe normalization of recognized list fields below, or remove an unnecessary `Vary` at the origin only after proving the response is invariant. A VCL `unset beresp.http.Vary` is *possible*, but it is not the equivalent of a guarded static-file optimization.
|
||||
|
||||
## `Vary` matching (RFC 9111 §4.1)
|
||||
|
||||
Cached variants use the response's `Vary` field names together with the original request's nominated fields. Reuse requires a match in **every** retained `Vary` dimension; `Vary: *` is never reusable. An absent request field is not equivalent to a present but empty field.
|
||||
@@ -60,7 +66,7 @@ Imported VCL is compiled into the **same rule engine** as the global and per-Vho
|
||||
|
||||
### Complete VCL support and `Vary`/header overrides
|
||||
|
||||
See [VCL compatibility and header overrides](VCL.md) for a statement-by-statement compatibility matrix, global/per-Vhost priority, stage timing, exact `set`/`unset` support, `Vary` behavior and protected headers. **`beresp.http.Vary` affects cache variants; `resp.http.Vary` only affects the outgoing header.** Unsetting either can break downstream cache correctness. `set/unset beresp.http.Cache-Control` changes cache admission policy, while deliver-stage header edits do not. A deliberately rewritten `private`/`no-store` header or removed `Set-Cookie` no longer protects the representation, so use these actions only for public content.
|
||||
See the [practical VCL traffic cookbook](VCL_TRAFFIC_COOKBOOK.md) for examples, expected request outcomes and curl tests; [VCL compatibility and header overrides](VCL.md) and the [exhaustive support matrix](VCL_SUPPORT_MATRIX.md) for a statement-by-statement compatibility matrix, global/per-Vhost priority, stage timing, exact `set`/`unset` support, `Vary` behavior and protected headers. **`beresp.http.Vary` affects cache variants; `resp.http.Vary` only affects the outgoing header.** Unsetting either can break downstream cache correctness. `set/unset beresp.http.Cache-Control` changes cache admission policy, while deliver-stage header edits do not. A deliberately rewritten `private`/`no-store` header or removed `Set-Cookie` no longer protects the representation, so use these actions only for public content.
|
||||
|
||||
### Explicit Cookie lookup with imported VCL
|
||||
|
||||
|
||||
Reference in new issue
Block a user