egg-cookies
Advanced tools
Comparing version 2.9.0 to 2.9.1
@@ -10,3 +10,3 @@ /** | ||
/** | ||
* Auto get and set `__Host` prefix cookie to adaptation CHIPS mode (The default value is false). | ||
* Auto get and set `_CHIPS-` prefix cookie to adaptation CHIPS mode (The default value is false). | ||
*/ | ||
@@ -13,0 +13,0 @@ autoChips?: boolean; |
@@ -60,3 +60,3 @@ 'use strict'; | ||
if (value === undefined && this._autoChips) { | ||
// try to read __Host-${name} prefix cookie | ||
// try to read _CHIPS-${name} prefix cookie | ||
value = this._get(this._formatChipsCookieName(name), opts); | ||
@@ -174,3 +174,3 @@ } | ||
} else if (autoChips) { | ||
// add __Host-${name} prefix cookie | ||
// add _CHIPS-${name} prefix cookie | ||
const newCookieName = this._formatChipsCookieName(name); | ||
@@ -211,3 +211,3 @@ const newCookieOpts = Object.assign({}, opts, { | ||
_formatChipsCookieName(name) { | ||
return `__Host-${name}`; | ||
return `_CHIPS-${name}`; | ||
} | ||
@@ -214,0 +214,0 @@ |
{ | ||
"name": "egg-cookies", | ||
"version": "2.9.0", | ||
"version": "2.9.1", | ||
"description": "cookies module for egg", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -36,3 +36,3 @@ # egg-cookies | ||
- autoChips - `Boolean` 是否开启 [CHIPS](https://developers.google.com/privacy-sandbox/3pcd/chips#security_design) 的自动适配方案, | ||
会自动给 Cookie 新增一个 `__Host` 为前缀的分区 Cookie,优先读取非分区 Cookie,读取失败则尝试读取 `__Host` 前缀的同名 Cookie 适配三方 Cookie 禁止逻辑。 | ||
会自动给 Cookie 新增一个 `_CHIPS-` 为前缀的分区 Cookie,优先读取非分区 Cookie,读取失败则尝试读取 `_CHIPS-` 前缀的同名 Cookie 适配三方 Cookie 禁止逻辑。 | ||
一旦配置 `autoChips=true`,那么会强制忽略 `partitioned`、`removeUnpartitioned` 参数。 | ||
@@ -39,0 +39,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30524