Locale cookie honours consent saved under a bumped policy version

The proxy parsed the consent cookie as version 1, so after an editor
bumped the policy version NEXT_LOCALE was never saved. It now accepts the
stored record's own version; policyVersion pins one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-22 17:35:08 +02:00
co-authored by Claude Opus 5.5
parent 0fd57c1d6a
commit 7d835bdc49
3 changed files with 57 additions and 1 deletions
+2
View File
@@ -49,6 +49,8 @@ type CreateProxyOptions = {
* requested with `Accept: text/markdown` is rewritten to its Markdown version.
*/
markdown?: boolean | string
/** Consent policy version to require for saving the locale cookie (createLocaleMiddleware). */
policyVersion?: number
}
/**