@nocobase/cli-v1 2.4.0-alpha.3 → 2.4.0-alpha.5
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 +28 -2
- package/package.json +4 -4
package/nocobase.conf.tpl
CHANGED
|
@@ -22,6 +22,11 @@ map $http_host $final_host {
|
|
|
22
22
|
"" $host;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
map $request_uri $legacy_file_app {
|
|
26
|
+
default "";
|
|
27
|
+
~[?&]__appName=(?<legacy_file_app_name>[A-Za-z0-9_-]+)(?:&|$) $legacy_file_app_name;
|
|
28
|
+
}
|
|
29
|
+
|
|
25
30
|
server {
|
|
26
31
|
listen 80;
|
|
27
32
|
server_name _;
|
|
@@ -36,9 +41,25 @@ server {
|
|
|
36
41
|
gzip on;
|
|
37
42
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
|
38
43
|
|
|
44
|
+
location = /_nocobase_legacy_file_auth {
|
|
45
|
+
internal;
|
|
46
|
+
proxy_pass http://127.0.0.1:{{apiPort}}{{publicPath}}api/auth:checkLegacyFileAccess;
|
|
47
|
+
proxy_pass_request_body off;
|
|
48
|
+
proxy_set_header Content-Length "";
|
|
49
|
+
proxy_set_header Cookie $http_cookie;
|
|
50
|
+
proxy_set_header Authorization $http_authorization;
|
|
51
|
+
proxy_set_header X-App $legacy_file_app;
|
|
52
|
+
proxy_set_header X-Original-URI $request_uri;
|
|
53
|
+
proxy_set_header Host $final_host;
|
|
54
|
+
proxy_set_header X-Forwarded-Proto $upstream_x_forwarded_proto;
|
|
55
|
+
}
|
|
56
|
+
|
|
39
57
|
location ~* ^{{publicPath}}storage/uploads/(.*\.(?:htm|html|pdf|svg|svgz|xht|xhtml|xml|xsl|xslt))$ {
|
|
40
58
|
alias {{cwd}}/storage/uploads/$1;
|
|
41
|
-
|
|
59
|
+
auth_request /_nocobase_legacy_file_auth;
|
|
60
|
+
auth_request_set $legacy_auth_set_cookie $upstream_http_set_cookie;
|
|
61
|
+
add_header Cache-Control "private, no-store" always;
|
|
62
|
+
add_header Set-Cookie $legacy_auth_set_cookie always;
|
|
42
63
|
add_header Content-Disposition "attachment" always;
|
|
43
64
|
add_header Content-Security-Policy "sandbox" always;
|
|
44
65
|
add_header X-Content-Type-Options "nosniff" always;
|
|
@@ -48,7 +69,10 @@ server {
|
|
|
48
69
|
|
|
49
70
|
location {{publicPath}}storage/uploads/ {
|
|
50
71
|
alias {{cwd}}/storage/uploads/;
|
|
51
|
-
|
|
72
|
+
auth_request /_nocobase_legacy_file_auth;
|
|
73
|
+
auth_request_set $legacy_auth_set_cookie $upstream_http_set_cookie;
|
|
74
|
+
add_header Cache-Control "private, no-store" always;
|
|
75
|
+
add_header Set-Cookie $legacy_auth_set_cookie always;
|
|
52
76
|
add_header Content-Security-Policy "sandbox" always;
|
|
53
77
|
add_header X-Content-Type-Options "nosniff" always;
|
|
54
78
|
access_log off;
|
|
@@ -57,6 +81,8 @@ server {
|
|
|
57
81
|
location ~* \.md$ {
|
|
58
82
|
default_type text/markdown;
|
|
59
83
|
add_header Content-Disposition "inline";
|
|
84
|
+
add_header Cache-Control "private, no-store" always;
|
|
85
|
+
add_header Set-Cookie $legacy_auth_set_cookie always;
|
|
60
86
|
add_header Content-Security-Policy "sandbox" always;
|
|
61
87
|
add_header X-Content-Type-Options "nosniff" always;
|
|
62
88
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/cli-v1",
|
|
3
|
-
"version": "2.4.0-alpha.
|
|
3
|
+
"version": "2.4.0-alpha.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"nocobase-v1": "./bin/index.js"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@nocobase/cli": "2.4.0-alpha.
|
|
12
|
+
"@nocobase/cli": "2.4.0-alpha.5",
|
|
13
13
|
"@nocobase/license-kit": "^0.3.8",
|
|
14
|
-
"@nocobase/utils": "2.4.0-alpha.
|
|
14
|
+
"@nocobase/utils": "2.4.0-alpha.5",
|
|
15
15
|
"chalk": "^4.1.1",
|
|
16
16
|
"commander": "^9.2.0",
|
|
17
17
|
"deepmerge": "^4.3.1",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
34
34
|
"directory": "packages/core/cli"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "ce4b0948641b13d2964c44905cb30bebe877a657"
|
|
37
37
|
}
|