@dokebi/i18n 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/page.js CHANGED
@@ -379,7 +379,12 @@ export class PageMessages {
379
379
  if (all.size !== wanted.length)
380
380
  wanted = [...all];
381
381
  }
382
- const header = request.headers[PAGE_HEADER];
382
+ // A public page's first HTML is the same for every visitor (D-0195): no claim of this
383
+ // request is read, neither the cookie nor the visit header. Its answer does not vary by
384
+ // X-Dokebi-I18n, so a request that sent the header (the version and the tokens are in every
385
+ // page) would have left the bundles and the settings out of the HTML a shared cache then
386
+ // gives everyone (audit R9-g13-1).
387
+ const header = publicPage ? undefined : request.headers[PAGE_HEADER];
383
388
  let claim = NOTHING;
384
389
  let fromCookie = false;
385
390
  if (header !== undefined)
package/dist/plugin.js CHANGED
@@ -102,7 +102,7 @@ export class I18nRuntime {
102
102
  }
103
103
  export const createPlugin = definePlugin({
104
104
  name: 'dokebi-i18n',
105
- version: '0.2.3',
105
+ version: '0.2.4',
106
106
  core: '^0.4.0',
107
107
  options,
108
108
  contributes: [localeData],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dokebi/i18n",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Compiled translation catalogs, locale negotiation, cardinal plurals and named Intl formats.",
5
5
  "keywords": [
6
6
  "dokebi",
@@ -97,6 +97,6 @@
97
97
  }
98
98
  },
99
99
  "devDependencies": {
100
- "@dokebi/web": "0.4.6"
100
+ "@dokebi/web": "0.4.7"
101
101
  }
102
102
  }