Comparing version 1.5.13 to 1.5.14
@@ -29,3 +29,5 @@ (function() { | ||
options.forceDetectLngFromPath = options.forceDetectLngFromPath !== true ? false : options.forceDetectLngFromPath; | ||
options.ignoreRoutes = options.ignoreRoutes || []; | ||
options.supportedLngs = []; | ||
options.ignoreRoutes = options.ignoreRoutes || []; | ||
options.cookieName = options.cookieName || 'i18next'; | ||
resStore = options.resStore ? options.resStore : {}; | ||
@@ -106,3 +108,3 @@ | ||
i18n.setLng(locale, function() { | ||
if (i18n.useCookie) i18n.persistCookie(req, res, i18n.lng()); | ||
if (i18n.options.useCookie) i18n.persistCookie(req, res, i18n.lng()); | ||
next(); | ||
@@ -248,3 +250,3 @@ }); | ||
cookies.set('i18next', locale, { expires: expirationDate, httpOnly : false }); | ||
cookies.set(i18n.options.cookieName, locale, { expires: expirationDate, httpOnly : false }); | ||
}; | ||
@@ -251,0 +253,0 @@ |
(function() { | ||
// when updating i18next dep update version here | ||
var i18nVersion = '1.5.8'; | ||
var i18nVersion = '1.5.9'; | ||
@@ -30,3 +30,3 @@ var i18n = require('./dep/i18next-' + i18nVersion) | ||
var lookUp = wrapper.pluralExtensions.rules[part.split('-')[0]]; | ||
if (lookUp) locale = part; | ||
if (lookUp && (opts.supportedLngs.length === 0 || opts.supportedLngs.indexOf(lookUp) > -1)) locale = part; | ||
} | ||
@@ -46,3 +46,3 @@ | ||
cookies = new Cookies(req, res); | ||
locale = cookies.get('i18next'); | ||
locale = cookies.get(opts.cookieName); | ||
} | ||
@@ -49,0 +49,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "i18n made easy - full featured: middleware, template support plus clientside use", | ||
"version": "1.5.13", | ||
"version": "1.5.14", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
Sorry, the diff of this file is too big to display
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
880537
4805