Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nuxt-i18n

Package Overview
Dependencies
Maintainers
1
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-i18n - npm Package Compare versions

Comparing version 2.9.3 to 2.9.4

lib/.DS_Store

10

CHANGELOG.md

@@ -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)

7

lib/templates/i18n.routing.middleware.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc