This commit is contained in:
Mateusz Gruszczyński committed 2026-11-20 19:51:27 +01:00
1 parent 15425fb803
commit 0fc9c0d239
21 files changed
+395 -36

No files matched your search

+5 -1
View File
@@ -1,6 +1,6 @@
# VCL capability matrix: implemented, limited and unsupported
**Applies to the RustProxy 0.39.0 source tree with the Docker/Cache/Traffic and CDN-template fixes.** This is an implementation inventory, not a statement of general Varnish compatibility. The authoritative implementation is `src/cache/vcl.rs` (tokenization and import), `src/cache/rules.rs` (validation and rule evaluation), and `src/cache/policy.rs` / `src/cache/lookup.rs` (shared-cache admission and lookup). See [VCL syntax and header semantics](VCL.md) for implementation details, the [VCL traffic cookbook](VCL_TRAFFIC_COOKBOOK.md) for ready-to-import VCL and a request/response scenario matrix, and [HTTP cache](CACHE.md) for cache policy.
**Applies to the RustProxy 0.39.1 source tree with the Docker/Cache/Traffic and CDN-template fixes.** This is an implementation inventory, not a statement of general Varnish compatibility. The authoritative implementation is `src/cache/vcl.rs` (tokenization and import), `src/cache/rules.rs` (validation and rule evaluation), and `src/cache/policy.rs` / `src/cache/lookup.rs` (shared-cache admission and lookup). See [VCL syntax and header semantics](VCL.md) for implementation details, the [VCL traffic cookbook](VCL_TRAFFIC_COOKBOOK.md) for ready-to-import VCL and a request/response scenario matrix, and [HTTP cache](CACHE.md) for cache policy.
## Practical examples and traffic scenarios
@@ -205,6 +205,10 @@ The labels above distinguish explicit product limits from missing work; **not im
5. On a real, authorized test origin send two identical requests to compare MISS/HIT and a changed Vary dimension to ensure distinct variants. The rule tester **cannot replace** this test.
6. For Docker services, repeat after a container disappears and returns, checking the same saved Vhost assignment and the Cache/Traffic scope labels.
### Included opt-in public-Vhost inherited-cookie policy
The graphical **Public vhost: ignore inherited cookies** template (`src/admin/web/cache-rules.js`) is available only in local Vhost/Docker Vhost rule editors and inserted disabled. It deliberately drops the **entire** Cookie header on public GET/HEAD requests, and only if the request does not carry Authorization and the path does not match the operator-reviewed private-path exclusions. It also asks for lookup and stops later request-stage rules. The VCL equivalent is [`examples/vcl/public-vhost-ignore-cookies.vcl`](../examples/vcl/public-vhost-ignore-cookies.vcl). The normal request/response eligibility guards still apply; no shared-cache use of private/no-store or Set-Cookie responses is authorized. The issuing application's host-only `Set-Cookie` is preferable whenever possible. The original cookie's Domain is not transmitted in HTTP Cookie and cannot be inferred; this is a broad, high-impact opt-in rule, not an automatic safe way to discard only parent-domain cookies.
### Included opt-in CDN cookie policy
The source file [`examples/vcl/cdn-technical-cookies.vcl`](../examples/vcl/cdn-technical-cookies.vcl) and the **CDN technical cookies** cache-rule template provide the same basic safe policy: bypass unsafe methods, sensitive paths and Authorization; strip Cookie only when **all cookies** are in a known allowlist; otherwise bypass. The list includes Cloudflare (`__cf_bm`, `cf_clearance`, `_cfuvid`, `__cfruid`, `__cfseq`) and Akamai (`_abck`, `ak_bmsc`, `bm_sz`, `bm_sv`). Review the list for your origin and CDN challenge flow: some technical/security cookies are needed by the origin and **must not** be stripped in those deployments. This policy is **opt-in**; it does not change the default behavior of existing Vhosts.