@nocobase/cli 2.1.0-alpha.13 → 2.1.0-alpha.14
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/nocobase.conf.tpl +10 -5
- package/package.json +4 -4
- package/src/util.js +4 -1
package/nocobase.conf.tpl
CHANGED
|
@@ -17,6 +17,11 @@ map $http_x_forwarded_proto $upstream_x_forwarded_proto {
|
|
|
17
17
|
"" $scheme;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
map $http_host $final_host {
|
|
21
|
+
default $http_host;
|
|
22
|
+
"" $host;
|
|
23
|
+
}
|
|
24
|
+
|
|
20
25
|
server {
|
|
21
26
|
listen 80;
|
|
22
27
|
server_name _;
|
|
@@ -82,7 +87,7 @@ server {
|
|
|
82
87
|
proxy_set_header Connection 'upgrade';
|
|
83
88
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
84
89
|
proxy_set_header X-Forwarded-Proto $upstream_x_forwarded_proto;
|
|
85
|
-
proxy_set_header Host $
|
|
90
|
+
proxy_set_header Host $final_host;
|
|
86
91
|
proxy_set_header Referer $http_referer;
|
|
87
92
|
proxy_set_header User-Agent $http_user_agent;
|
|
88
93
|
add_header Cache-Control 'no-cache, no-store';
|
|
@@ -102,7 +107,7 @@ server {
|
|
|
102
107
|
proxy_set_header Connection 'upgrade';
|
|
103
108
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
104
109
|
proxy_set_header X-Forwarded-Proto $upstream_x_forwarded_proto;
|
|
105
|
-
proxy_set_header Host $
|
|
110
|
+
proxy_set_header Host $final_host;
|
|
106
111
|
proxy_set_header Referer $http_referer;
|
|
107
112
|
proxy_set_header User-Agent $http_user_agent;
|
|
108
113
|
add_header Cache-Control 'no-cache, no-store';
|
|
@@ -121,7 +126,7 @@ server {
|
|
|
121
126
|
proxy_set_header Connection 'upgrade';
|
|
122
127
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
123
128
|
proxy_set_header X-Forwarded-Proto $upstream_x_forwarded_proto;
|
|
124
|
-
proxy_set_header Host $
|
|
129
|
+
proxy_set_header Host $final_host;
|
|
125
130
|
proxy_set_header Referer $http_referer;
|
|
126
131
|
proxy_set_header User-Agent $http_user_agent;
|
|
127
132
|
add_header Cache-Control 'no-cache, no-store';
|
|
@@ -158,7 +163,7 @@ server {
|
|
|
158
163
|
proxy_set_header Connection 'upgrade';
|
|
159
164
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
160
165
|
proxy_set_header X-Forwarded-Proto $upstream_x_forwarded_proto;
|
|
161
|
-
proxy_set_header Host $
|
|
166
|
+
proxy_set_header Host $final_host;
|
|
162
167
|
proxy_set_header Referer $http_referer;
|
|
163
168
|
proxy_set_header User-Agent $http_user_agent;
|
|
164
169
|
add_header Cache-Control 'no-cache, no-store';
|
|
@@ -174,6 +179,6 @@ server {
|
|
|
174
179
|
proxy_http_version 1.1;
|
|
175
180
|
proxy_set_header Upgrade $http_upgrade;
|
|
176
181
|
proxy_set_header Connection "Upgrade";
|
|
177
|
-
proxy_set_header Host $
|
|
182
|
+
proxy_set_header Host $final_host;
|
|
178
183
|
}
|
|
179
184
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/cli",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"nocobase": "./bin/index.js"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@nocobase/app": "2.1.0-alpha.
|
|
11
|
+
"@nocobase/app": "2.1.0-alpha.14",
|
|
12
12
|
"@nocobase/license-kit": "^0.3.8",
|
|
13
13
|
"@types/fs-extra": "^11.0.1",
|
|
14
14
|
"@umijs/utils": "3.5.20",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"tsx": "^4.19.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@nocobase/devtools": "2.1.0-alpha.
|
|
30
|
+
"@nocobase/devtools": "2.1.0-alpha.14"
|
|
31
31
|
},
|
|
32
32
|
"repository": {
|
|
33
33
|
"type": "git",
|
|
34
34
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
35
35
|
"directory": "packages/core/cli"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "d8735b541de0ff9557bba704de49c799b4962672"
|
|
38
38
|
}
|
package/src/util.js
CHANGED
|
@@ -360,7 +360,10 @@ function buildIndexHtml(force = false) {
|
|
|
360
360
|
.replace(/\{\{env.WS_PATH\}\}/g, process.env.WS_PATH)
|
|
361
361
|
.replace(/\{\{env.ESM_CDN_BASE_URL\}\}/g, process.env.ESM_CDN_BASE_URL || '')
|
|
362
362
|
.replace(/\{\{env.ESM_CDN_SUFFIX\}\}/g, process.env.ESM_CDN_SUFFIX || '')
|
|
363
|
-
.replace(
|
|
363
|
+
.replace(/((?:src|href)=")(?:\.\/)?assets\//g, `$1${process.env.APP_PUBLIC_PATH}assets/`)
|
|
364
|
+
.replace(/((?:src|href)=")\/assets\//g, `$1${process.env.APP_PUBLIC_PATH}assets/`)
|
|
365
|
+
.replace('src="/umi.', `src="${process.env.APP_PUBLIC_PATH}umi.`)
|
|
366
|
+
.replace(/((?:src|href)="[^"]*?)\/{2,}(assets\/)/g, '$1/$2');
|
|
364
367
|
|
|
365
368
|
if (process.env.CDN_BASE_URL) {
|
|
366
369
|
const appBaseUrl = process.env.CDN_BASE_URL.replace(/\/+$/, '');
|