nuxt-i18n
Advanced tools
Comparing version 2.9.3 to 2.9.4
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="2.9.4"></a> | ||
## [2.9.4](https://github.com/nuxt-community/nuxt-i18n/compare/v2.9.3...v2.9.4) (2018-04-16) | ||
### Bug Fixes | ||
* Fix redirect cookie handling ([209b60d](https://github.com/nuxt-community/nuxt-i18n/commit/209b60d)), closes [#70](https://github.com/nuxt-community/nuxt-i18n/issues/70) | ||
<a name="2.9.3"></a> | ||
@@ -7,0 +17,0 @@ ## [2.9.3](https://github.com/nuxt-community/nuxt-i18n/compare/v2.9.2...v2.9.3) (2018-04-16) |
@@ -23,6 +23,9 @@ import cookie from 'cookie' | ||
const cookieKey = '<%= options.redirectCookieKey %>' | ||
const cookies = req.headers && req.headers.cookies ? | ||
const cookies = req.headers && req.headers.cookie ? | ||
cookie.parse(req.headers.cookie) : {} | ||
// Redirect only if cookie not set yet | ||
if (typeof req.headers['accept-language'] !== 'undefined' && (!cookies[cookieKey] || !useRedirectCookie)) { | ||
if ( | ||
typeof req.headers['accept-language'] !== 'undefined' && | ||
((useRedirectCookie && !cookies[cookieKey]) || !useRedirectCookie) | ||
) { | ||
const browserLocale = req.headers['accept-language'].split(',')[0].toLocaleLowerCase().substring(0, 2) | ||
@@ -29,0 +32,0 @@ // Set cookie |
{ | ||
"name": "nuxt-i18n", | ||
"version": "2.9.3", | ||
"version": "2.9.4", | ||
"description": "i18n for Nuxt", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
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
34039
13
416
1