@abtnode/router-provider 1.16.6-beta-9e9fec72 → 1.16.6-beta-7cbab489
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/lib/nginx/index.js +5 -1
- package/package.json +7 -9
package/lib/nginx/index.js
CHANGED
|
@@ -564,7 +564,7 @@ class NginxProvider extends BaseProvider {
|
|
|
564
564
|
location._add('try_files', '$uri /404.html break');
|
|
565
565
|
}
|
|
566
566
|
|
|
567
|
-
_addGeneralProxyLocation({ server, port, prefix, suffix, blockletDid }) {
|
|
567
|
+
_addGeneralProxyLocation({ server, port, prefix, suffix, blockletDid, targetPrefix }) {
|
|
568
568
|
server._add('location', concatPath(prefix, suffix));
|
|
569
569
|
const location = this._getLastLocation(server);
|
|
570
570
|
this._addCommonHeader(location);
|
|
@@ -573,6 +573,10 @@ class NginxProvider extends BaseProvider {
|
|
|
573
573
|
location._add('proxy_set_header', `X-Blocklet-Did ${blockletDid}`);
|
|
574
574
|
}
|
|
575
575
|
|
|
576
|
+
if (targetPrefix && targetPrefix !== '/') {
|
|
577
|
+
location._add('rewrite', `^${targetPrefix}/?(.*) /$1 break`);
|
|
578
|
+
}
|
|
579
|
+
|
|
576
580
|
location._add('proxy_pass', `http://${getUpstreamName(port)}`);
|
|
577
581
|
}
|
|
578
582
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/router-provider",
|
|
3
|
-
"version": "1.16.6-beta-
|
|
3
|
+
"version": "1.16.6-beta-7cbab489",
|
|
4
4
|
"description": "Routing engine implementations for abt node",
|
|
5
5
|
"author": "polunzh <polunzh@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/ArcBlock/blocklet-server#readme",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"url": "https://github.com/ArcBlock/blocklet-server/issues"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@abtnode/constant": "1.16.6-beta-
|
|
36
|
-
"@abtnode/logger": "1.16.6-beta-
|
|
37
|
-
"@abtnode/router-templates": "1.16.6-beta-
|
|
38
|
-
"@abtnode/util": "1.16.6-beta-
|
|
35
|
+
"@abtnode/constant": "1.16.6-beta-7cbab489",
|
|
36
|
+
"@abtnode/logger": "1.16.6-beta-7cbab489",
|
|
37
|
+
"@abtnode/router-templates": "1.16.6-beta-7cbab489",
|
|
38
|
+
"@abtnode/util": "1.16.6-beta-7cbab489",
|
|
39
39
|
"axios": "^0.27.2",
|
|
40
40
|
"debug": "^4.3.4",
|
|
41
41
|
"find-process": "^1.4.7",
|
|
@@ -54,13 +54,11 @@
|
|
|
54
54
|
"shelljs": "^0.8.5",
|
|
55
55
|
"tar": "^6.1.11",
|
|
56
56
|
"url-join": "^4.0.1",
|
|
57
|
-
"uuid": "^8.3.2",
|
|
58
57
|
"valid-url": "^1.0.9"
|
|
59
58
|
},
|
|
60
59
|
"devDependencies": {
|
|
61
60
|
"bluebird": "^3.7.2",
|
|
62
|
-
"fs-extra": "^10.1.0"
|
|
63
|
-
"needle": "^3.1.0"
|
|
61
|
+
"fs-extra": "^10.1.0"
|
|
64
62
|
},
|
|
65
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "36b58c0651762472ac34ad880965c47510eb9768"
|
|
66
64
|
}
|