@netlify/redirects 4.0.1 → 4.0.2

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.
Files changed (2) hide show
  1. package/dist/main.js +2 -2
  2. package/package.json +3 -3
package/dist/main.js CHANGED
@@ -4,7 +4,7 @@ import process from "process";
4
4
  // src/lib/rewriter.ts
5
5
  import path from "path";
6
6
  import { toMultiValueHeaders } from "@netlify/dev-utils";
7
- import cookie from "cookie";
7
+ import { parseCookie } from "cookie";
8
8
  import redirector from "netlify-redirector";
9
9
 
10
10
  // src/lib/parser.ts
@@ -93,7 +93,7 @@ var createRewriter = async function({
93
93
  return async function rewriter(req) {
94
94
  const matcherFunc = await getMatcher();
95
95
  const reqUrl = new URL(req.url);
96
- const cookieValues = cookie.parse(req.headers.get("cookie") || "");
96
+ const cookieValues = parseCookie(req.headers.get("cookie") || "");
97
97
  const headers = {
98
98
  "x-language": cookieValues.nf_lang || getLanguage(req.headers.get("accept-language")),
99
99
  "x-country": cookieValues.nf_country || geoCountry || "us",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/redirects",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "TypeScript implementation of Netlify's rewrites and redirects engine",
5
5
  "type": "module",
6
6
  "engines": {
@@ -43,8 +43,8 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@netlify/dev-utils": "6.0.1",
46
- "@netlify/redirect-parser": "^16.1.0",
47
- "cookie": "^1.0.2",
46
+ "@netlify/redirect-parser": "^16.1.1",
47
+ "cookie": "^2.0.0",
48
48
  "jsonwebtoken": "9.0.3",
49
49
  "netlify-redirector": "^0.5.0"
50
50
  }