@nocobase/cli-v1 2.2.0-alpha.7 → 2.2.0-alpha.9

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 CHANGED
@@ -163,6 +163,23 @@ server {
163
163
  send_timeout 600;
164
164
  }
165
165
 
166
+ # File access URLs are application routes. Keep them above the SPA
167
+ # locations so Nginx forwards them to the NocoBase gateway.
168
+ location ^~ {{publicPath}}files/ {
169
+ proxy_pass http://127.0.0.1:{{apiPort}};
170
+ proxy_http_version 1.1;
171
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
172
+ proxy_set_header X-Forwarded-Proto $upstream_x_forwarded_proto;
173
+ proxy_set_header Host $final_host;
174
+ proxy_set_header Referer $http_referer;
175
+ proxy_set_header User-Agent $http_user_agent;
176
+ add_header Cache-Control 'no-cache, no-store';
177
+ proxy_connect_timeout 600;
178
+ proxy_send_timeout 600;
179
+ proxy_read_timeout 600;
180
+ send_timeout 600;
181
+ }
182
+
166
183
 
167
184
 
168
185
  location {{publicPath}} {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/cli-v1",
3
- "version": "2.2.0-alpha.7",
3
+ "version": "2.2.0-alpha.9",
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.2.0-alpha.7",
12
+ "@nocobase/cli": "2.2.0-alpha.9",
13
13
  "@nocobase/license-kit": "^0.3.8",
14
- "@nocobase/utils": "2.2.0-alpha.7",
14
+ "@nocobase/utils": "2.2.0-alpha.9",
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": "34ba02960fca9ab0b6881d3db7040a8a64067bba"
36
+ "gitHead": "4949bf5ebcd92d77a3a0a718ed578c270e4bd570"
37
37
  }
@@ -38,6 +38,21 @@ module.exports = (cli) => {
38
38
  return 302 ${appPublicPathWithoutTrailingSlash}$uri$is_args$args;
39
39
  }
40
40
 
41
+ location ^~ /files/ {
42
+ proxy_pass http://127.0.0.1:${process.env.APP_PORT};
43
+ proxy_http_version 1.1;
44
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
45
+ proxy_set_header X-Forwarded-Proto $upstream_x_forwarded_proto;
46
+ proxy_set_header Host $final_host;
47
+ proxy_set_header Referer $http_referer;
48
+ proxy_set_header User-Agent $http_user_agent;
49
+ add_header Cache-Control 'no-cache, no-store';
50
+ proxy_connect_timeout 600;
51
+ proxy_send_timeout 600;
52
+ proxy_read_timeout 600;
53
+ send_timeout 600;
54
+ }
55
+
41
56
  location / {
42
57
  alias ${posix.resolve(process.cwd())}/node_modules/@nocobase/app/dist/client/;
43
58
  try_files $uri $uri/ /index.html;