Files
new-api/controller
Orrinandcoderabbitai[bot] 219c9e0634 优化匿名冷启动与公开内容接口的重复回源请求 (#7166)
* fix: reduce public bootstrap requests and revalidate content

* fix(controller): use a weak ETag for revalidated public JSON

/api is gzip-compressed by middleware that runs after the handler returns,
and the validator is computed over the uncompressed body. The compressed and
identity forms of one payload therefore share a validator, which a strong ETag
must not do -- it asserts byte-for-byte equality across representations
(RFC 9110 8.8.1). Serve W/ instead.

Weak comparison ignores W/ on both operands, so etagMatches now strips it from
the served validator as well as from each candidate. Stripping only the
candidate would make a weak served validator match nothing and silently
disable every 304.

Vary: Accept-Encoding stays. Weakening the validator makes revalidation
correct, but it does not separate the two encodings in a shared cache.

* fix(test): align response cookie helper name

* fix(auth): revalidate stale route sessions

* Update web/src/features/about/api.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* test: remove newly added PR tests

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-09-03 14:26:35 +08:00
..
2025-03-15 19:10:12 +08:00
2026-09-03 11:28:57 +08:00
2026-08-01 23:19:01 +08:00
2026-08-01 23:19:01 +08:00
2026-08-01 23:19:01 +08:00
2026-08-26 20:57:54 +08:00
2026-08-26 20:57:54 +08:00