netlify-cli 12.0.0 → 12.0.1
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.
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.1",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "netlify-cli",
|
|
9
|
-
"version": "12.0.
|
|
9
|
+
"version": "12.0.1",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ const os = require('os')
|
|
|
4
4
|
const process = require('process')
|
|
5
5
|
const { format, inspect } = require('util')
|
|
6
6
|
|
|
7
|
+
// eslint-disable-next-line no-restricted-modules
|
|
7
8
|
const { Instance: ChalkInstance } = require('chalk')
|
|
8
9
|
const chokidar = require('chokidar')
|
|
9
10
|
const decache = require('decache')
|
package/src/utils/proxy.js
CHANGED
package/src/utils/rules-proxy.js
CHANGED
|
@@ -33,11 +33,7 @@ const getLanguage = function (headers) {
|
|
|
33
33
|
return 'en'
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
const
|
|
37
|
-
return 'us'
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const createRewriter = async function ({ configPath, distDir, jwtRoleClaim, jwtSecret, projectDir }) {
|
|
36
|
+
const createRewriter = async function ({ configPath, distDir, geoCountry, jwtRoleClaim, jwtSecret, projectDir }) {
|
|
41
37
|
let matcher = null
|
|
42
38
|
const redirectsFiles = [...new Set([path.resolve(distDir, '_redirects'), path.resolve(projectDir, '_redirects')])]
|
|
43
39
|
let redirects = await parseRedirects({ redirectsFiles, configPath })
|
|
@@ -80,7 +76,7 @@ const createRewriter = async function ({ configPath, distDir, jwtRoleClaim, jwtS
|
|
|
80
76
|
const cookieValues = cookie.parse(req.headers.cookie || '')
|
|
81
77
|
const headers = {
|
|
82
78
|
'x-language': cookieValues.nf_lang || getLanguage(req.headers),
|
|
83
|
-
'x-country': cookieValues.nf_country ||
|
|
79
|
+
'x-country': cookieValues.nf_country || geoCountry || 'us',
|
|
84
80
|
...req.headers,
|
|
85
81
|
}
|
|
86
82
|
|