fix: 修复非 Node 环境报错

This commit is contained in:
xream committed 2025-11-29 00:08:07 +08:00
1 parent a00a408783
commit da34670a6f
2 files changed
+4 -3

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.20.46",
"version": "2.20.47",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
"main": "src/main.js",
"scripts": {
+3 -2
View File
@@ -9,8 +9,9 @@ export default function express({ substore: $, port, host }) {
'Access-Control-Allow-Methods': 'POST,GET,OPTIONS,PATCH,PUT,DELETE',
'Access-Control-Allow-Headers':
'Origin, X-Requested-With, Content-Type, Accept',
'X-Powered-By':
eval('process.env.SUB_STORE_X_POWERED_BY') || 'Sub-Store',
'X-Powered-By': isNode
? eval('process.env.SUB_STORE_X_POWERED_BY') || 'Sub-Store'
: 'Sub-Store',
};
// node support