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

i18next-express-middleware

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18next-express-middleware - npm Package Compare versions

Comparing version 1.3.2 to 1.4.0

4

CHANGELOG.md

@@ -0,1 +1,5 @@

### 1.4.0
- Set Content-Language response header [PR159](https://github.com/i18next/i18next-express-middleware/pull/159)
### 1.3.2

@@ -2,0 +6,0 @@

@@ -39,2 +39,5 @@ 'use strict';

req.language = req.locale = req.lng = lng;
if (!res.headersSent) {
res.set('Content-Language', lng);
}
req.languages = i18next.services.languageUtils.toResolveHierarchy(lng);

@@ -51,2 +54,5 @@ if (i18next.services.languageDetector) {

req.language = req.locale = req.lng = lng;
if (!res.headersSent) {
res.set('Content-Language', lng);
}
req.languages = i18next.services.languageUtils.toResolveHierarchy(lng);

@@ -53,0 +59,0 @@

@@ -42,5 +42,16 @@ 'use strict';

cookies.set(options.lookupCookie, lng, { expires: expirationDate, domain: options.cookieDomain, httpOnly: false, overwrite: true });
var cookieOptions = {
expires: expirationDate,
domain: options.cookieDomain,
httpOnly: false,
overwrite: true
};
if (options.hasOwnProperty('cookieSecure')) {
cookieOptions.secure = options.cookieSecure;
}
cookies.set(options.lookupCookie, lng, cookieOptions);
}
}
};

2

package.json
{
"name": "i18next-express-middleware",
"version": "1.3.2",
"version": "1.4.0",
"description": "express middleware for i18next",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

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