Skip to content

Commit da34670

Browse files
committed
fix: 修复非 Node 环境报错
1 parent a00a408 commit da34670

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sub-store",
3-
"version": "2.20.46",
3+
"version": "2.20.47",
44
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
55
"main": "src/main.js",
66
"scripts": {

backend/src/vendor/express.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ export default function express({ substore: $, port, host }) {
99
'Access-Control-Allow-Methods': 'POST,GET,OPTIONS,PATCH,PUT,DELETE',
1010
'Access-Control-Allow-Headers':
1111
'Origin, X-Requested-With, Content-Type, Accept',
12-
'X-Powered-By':
13-
eval('process.env.SUB_STORE_X_POWERED_BY') || 'Sub-Store',
12+
'X-Powered-By': isNode
13+
? eval('process.env.SUB_STORE_X_POWERED_BY') || 'Sub-Store'
14+
: 'Sub-Store',
1415
};
1516

1617
// node support

0 commit comments

Comments
 (0)