@daisy/ace-axe-runner-electron 1.2.6-alpha.1 → 1.2.6-alpha.3
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/init.js +120 -91
- package/package.json +2 -2
- package/src/init.js +124 -91
package/lib/init.js
CHANGED
|
@@ -326,7 +326,13 @@ function axeRunnerInit(eventEmmitter, CONCURRENT_INSTANCES) {
|
|
|
326
326
|
browserWindow.webContents.session.webRequest.onBeforeRequest({
|
|
327
327
|
urls: []
|
|
328
328
|
}, (details, callback) => {
|
|
329
|
-
if (details.url && /^
|
|
329
|
+
if (details.url && (/^file:\/\//.test(details.url) || /^https?:\/\//.test(details.url)
|
|
330
|
+
// && (
|
|
331
|
+
// (rootUrl && !details.url.startsWith(rootUrl))
|
|
332
|
+
// ||
|
|
333
|
+
// (!rootUrl && !/^https?:\/\/127.0.0.1/.test(details.url))
|
|
334
|
+
// )
|
|
335
|
+
)) {
|
|
330
336
|
if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} onBeforeRequest BLOCK: ${details.url} (${rootUrl})`);
|
|
331
337
|
|
|
332
338
|
// causes ERR_BLOCKED_BY_CLIENT -20 did-fail-load
|
|
@@ -759,7 +765,7 @@ new Promise((resolve, reject) => {
|
|
|
759
765
|
}
|
|
760
766
|
axeRunnerInit.todo = true;
|
|
761
767
|
|
|
762
|
-
const filePathsExpressStaticNotExist = {};
|
|
768
|
+
// const filePathsExpressStaticNotExist = {};
|
|
763
769
|
function startAxeServer(basedir, scripts, scriptContents) {
|
|
764
770
|
|
|
765
771
|
// NO_HTTP_REMOVE
|
|
@@ -832,6 +838,18 @@ function startAxeServer(basedir, scripts, scriptContents) {
|
|
|
832
838
|
if (!fs.existsSync(fileSystemPath)) {
|
|
833
839
|
fileSystemPath = pn;
|
|
834
840
|
if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} filepath to read (corrected): ${fileSystemPath}`);
|
|
841
|
+
if (!fs.existsSync(fileSystemPath)) {
|
|
842
|
+
if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} FILE DOES NOT EXIST!! ${fileSystemPath}`);
|
|
843
|
+
|
|
844
|
+
const buff = Buffer.from(`<html><body><p>Internal Server Error</p><p>404?! ${fileSystemPath}</p></body></html>`);
|
|
845
|
+
headers["Content-Length"] = buff.length.toString();
|
|
846
|
+
callback({
|
|
847
|
+
data: bufferToStream(buff),
|
|
848
|
+
headers,
|
|
849
|
+
statusCode: 404
|
|
850
|
+
});
|
|
851
|
+
return;
|
|
852
|
+
}
|
|
835
853
|
}
|
|
836
854
|
|
|
837
855
|
// let html = fs.readFileSync(fileSystemPath, { encoding: "utf8" });
|
|
@@ -894,6 +912,18 @@ function startAxeServer(basedir, scripts, scriptContents) {
|
|
|
894
912
|
if (!fs.existsSync(fileSystemPath)) {
|
|
895
913
|
fileSystemPath = pn;
|
|
896
914
|
if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} --filepath to read (corrected): ${fileSystemPath}`);
|
|
915
|
+
if (!fs.existsSync(fileSystemPath)) {
|
|
916
|
+
if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} --FILE DOES NOT EXIST!! ${fileSystemPath}`);
|
|
917
|
+
|
|
918
|
+
const buff = Buffer.from(`<html><body><p>Internal Server Error</p><p>404?! ${fileSystemPath}</p></body></html>`);
|
|
919
|
+
headers["Content-Length"] = buff.length.toString();
|
|
920
|
+
callback({
|
|
921
|
+
data: bufferToStream(buff),
|
|
922
|
+
headers,
|
|
923
|
+
statusCode: 404
|
|
924
|
+
});
|
|
925
|
+
return;
|
|
926
|
+
}
|
|
897
927
|
}
|
|
898
928
|
try {
|
|
899
929
|
let mediaType = mime.lookup(fileSystemPath) || "stream/octet";
|
|
@@ -920,95 +950,94 @@ function startAxeServer(basedir, scripts, scriptContents) {
|
|
|
920
950
|
});
|
|
921
951
|
}
|
|
922
952
|
|
|
923
|
-
if (isDev) {
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
}
|
|
953
|
+
// if (isDev) { // handle WebInspector JS maps etc.
|
|
954
|
+
|
|
955
|
+
// // const url = new URL(`https://fake.org${req.url}`);
|
|
956
|
+
// // const pathname = url.pathname;
|
|
957
|
+
// const pathname = decodeURI(u.pathname);
|
|
958
|
+
|
|
959
|
+
// const filePath = path.join(basedir, pathname);
|
|
960
|
+
// if (filePathsExpressStaticNotExist[filePath]) {
|
|
961
|
+
|
|
962
|
+
// const buff = Buffer.from(filePathsExpressStaticNotExist[filePath]);
|
|
963
|
+
// headers["Content-Length"] = buff.length.toString();
|
|
964
|
+
// headers["Content-Type"] = "plain/text";
|
|
965
|
+
// callback({
|
|
966
|
+
// data: bufferToStream(buff),
|
|
967
|
+
// headers,
|
|
968
|
+
// statusCode: 404,
|
|
969
|
+
// });
|
|
970
|
+
// return;
|
|
971
|
+
// }
|
|
972
|
+
// fsOriginal.exists(filePath, (exists) => {
|
|
973
|
+
// if (exists) {
|
|
974
|
+
// fsOriginal.readFile(filePath, undefined, (err, data) => {
|
|
975
|
+
// if (err) {
|
|
976
|
+
// if (LOG_DEBUG) {
|
|
977
|
+
// console.log(`${ACE_LOG_PREFIX} HTTP FAIL fsOriginal.exists && ERR ${basedir} + ${req.url} => ${filePath}`, err);
|
|
978
|
+
// }
|
|
979
|
+
// filePathsExpressStaticNotExist[filePath] = err.toString();
|
|
980
|
+
// const buff = Buffer.from(filePathsExpressStaticNotExist[filePath]);
|
|
981
|
+
// headers["Content-Length"] = buff.length.toString();
|
|
982
|
+
// headers["Content-Type"] = "plain/text";
|
|
983
|
+
// callback({
|
|
984
|
+
// data: bufferToStream(buff),
|
|
985
|
+
// headers,
|
|
986
|
+
// statusCode: 404,
|
|
987
|
+
// });
|
|
988
|
+
// } else {
|
|
989
|
+
// // if (LOG_DEBUG) {
|
|
990
|
+
// // console.log(`${ACE_LOG_PREFIX} HTTP OK fsOriginal.exists ${basedir} + ${req.url} => ${filePath}`);
|
|
991
|
+
// // }
|
|
992
|
+
// callback({
|
|
993
|
+
// data: null,
|
|
994
|
+
// headers,
|
|
995
|
+
// statusCode: 500,
|
|
996
|
+
// });
|
|
997
|
+
// }
|
|
998
|
+
// });
|
|
999
|
+
// } else {
|
|
1000
|
+
// fs.exists(filePath, (exists) => {
|
|
1001
|
+
// if (exists) {
|
|
1002
|
+
// fs.readFile(filePath, undefined, (err, data) => {
|
|
1003
|
+
// if (err) {
|
|
1004
|
+
// if (LOG_DEBUG) {
|
|
1005
|
+
// console.log(`${ACE_LOG_PREFIX} HTTP FAIL !fsOriginal.exists && fs.exists && ERR ${basedir} + ${req.url} => ${filePath}`, err);
|
|
1006
|
+
// }
|
|
1007
|
+
// filePathsExpressStaticNotExist[filePath] = err.toString();
|
|
1008
|
+
// const buff = Buffer.from(filePathsExpressStaticNotExist[filePath]);
|
|
1009
|
+
// headers["Content-Length"] = buff.length.toString();
|
|
1010
|
+
// headers["Content-Type"] = "plain/text";
|
|
1011
|
+
// callback({
|
|
1012
|
+
// data: bufferToStream(buff),
|
|
1013
|
+
// headers,
|
|
1014
|
+
// statusCode: 404,
|
|
1015
|
+
// });
|
|
1016
|
+
// } else {
|
|
1017
|
+
// if (LOG_DEBUG) {
|
|
1018
|
+
// console.log(`${ACE_LOG_PREFIX} HTTP OK !fsOriginal.exists && fs.exists ${basedir} + ${req.url} => ${filePath}`);
|
|
1019
|
+
// }
|
|
1020
|
+
// callback({
|
|
1021
|
+
// data: null,
|
|
1022
|
+
// headers,
|
|
1023
|
+
// statusCode: 500,
|
|
1024
|
+
// });
|
|
1025
|
+
// }
|
|
1026
|
+
// });
|
|
1027
|
+
// } else {
|
|
1028
|
+
// if (LOG_DEBUG) {
|
|
1029
|
+
// console.log(`${ACE_LOG_PREFIX} HTTP FAIL !fsOriginal.exists && !fs.exists ${basedir} + ${req.url} => ${filePath}`);
|
|
1030
|
+
// }
|
|
1031
|
+
// callback({
|
|
1032
|
+
// data: null,
|
|
1033
|
+
// headers,
|
|
1034
|
+
// statusCode: 404,
|
|
1035
|
+
// });
|
|
1036
|
+
// }
|
|
1037
|
+
// });
|
|
1038
|
+
// }
|
|
1039
|
+
// });
|
|
1040
|
+
// }
|
|
1012
1041
|
};
|
|
1013
1042
|
|
|
1014
1043
|
// NO_HTTP_REMOVE
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daisy/ace-axe-runner-electron",
|
|
3
|
-
"version": "1.2.6-alpha.
|
|
3
|
+
"version": "1.2.6-alpha.3",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=12.0.0",
|
|
6
6
|
"yarn": "^1.22.0",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"main": "lib/index.js",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@daisy/ace-cli-shared": "^1.2.6-alpha.
|
|
26
|
+
"@daisy/ace-cli-shared": "^1.2.6-alpha.3",
|
|
27
27
|
"mime-types": "^2.1.34",
|
|
28
28
|
"uuid": "^8.3.2"
|
|
29
29
|
},
|
package/src/init.js
CHANGED
|
@@ -333,8 +333,17 @@ function axeRunnerInit(eventEmmitter, CONCURRENT_INSTANCES) {
|
|
|
333
333
|
urls: [],
|
|
334
334
|
}, (details, callback) => {
|
|
335
335
|
if (details.url
|
|
336
|
-
&&
|
|
337
|
-
|
|
336
|
+
&&
|
|
337
|
+
(
|
|
338
|
+
/^file:\/\//.test(details.url)
|
|
339
|
+
||
|
|
340
|
+
/^https?:\/\//.test(details.url)
|
|
341
|
+
// && (
|
|
342
|
+
// (rootUrl && !details.url.startsWith(rootUrl))
|
|
343
|
+
// ||
|
|
344
|
+
// (!rootUrl && !/^https?:\/\/127.0.0.1/.test(details.url))
|
|
345
|
+
// )
|
|
346
|
+
)
|
|
338
347
|
) {
|
|
339
348
|
if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} onBeforeRequest BLOCK: ${details.url} (${rootUrl})`);
|
|
340
349
|
|
|
@@ -780,7 +789,7 @@ new Promise((resolve, reject) => {
|
|
|
780
789
|
}
|
|
781
790
|
axeRunnerInit.todo = true;
|
|
782
791
|
|
|
783
|
-
const filePathsExpressStaticNotExist = {};
|
|
792
|
+
// const filePathsExpressStaticNotExist = {};
|
|
784
793
|
function startAxeServer(basedir, scripts, scriptContents) {
|
|
785
794
|
|
|
786
795
|
// NO_HTTP_REMOVE
|
|
@@ -856,6 +865,18 @@ function startAxeServer(basedir, scripts, scriptContents) {
|
|
|
856
865
|
if (!fs.existsSync(fileSystemPath)) {
|
|
857
866
|
fileSystemPath = pn;
|
|
858
867
|
if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} filepath to read (corrected): ${fileSystemPath}`);
|
|
868
|
+
if (!fs.existsSync(fileSystemPath)) {
|
|
869
|
+
if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} FILE DOES NOT EXIST!! ${fileSystemPath}`);
|
|
870
|
+
|
|
871
|
+
const buff = Buffer.from(`<html><body><p>Internal Server Error</p><p>404?! ${fileSystemPath}</p></body></html>`);
|
|
872
|
+
headers["Content-Length"] = buff.length.toString();
|
|
873
|
+
callback({
|
|
874
|
+
data: bufferToStream(buff),
|
|
875
|
+
headers,
|
|
876
|
+
statusCode: 404,
|
|
877
|
+
});
|
|
878
|
+
return;
|
|
879
|
+
}
|
|
859
880
|
}
|
|
860
881
|
|
|
861
882
|
// let html = fs.readFileSync(fileSystemPath, { encoding: "utf8" });
|
|
@@ -918,6 +939,18 @@ function startAxeServer(basedir, scripts, scriptContents) {
|
|
|
918
939
|
if (!fs.existsSync(fileSystemPath)) {
|
|
919
940
|
fileSystemPath = pn;
|
|
920
941
|
if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} --filepath to read (corrected): ${fileSystemPath}`);
|
|
942
|
+
if (!fs.existsSync(fileSystemPath)) {
|
|
943
|
+
if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} --FILE DOES NOT EXIST!! ${fileSystemPath}`);
|
|
944
|
+
|
|
945
|
+
const buff = Buffer.from(`<html><body><p>Internal Server Error</p><p>404?! ${fileSystemPath}</p></body></html>`);
|
|
946
|
+
headers["Content-Length"] = buff.length.toString();
|
|
947
|
+
callback({
|
|
948
|
+
data: bufferToStream(buff),
|
|
949
|
+
headers,
|
|
950
|
+
statusCode: 404,
|
|
951
|
+
});
|
|
952
|
+
return;
|
|
953
|
+
}
|
|
921
954
|
}
|
|
922
955
|
try {
|
|
923
956
|
let mediaType = mime.lookup(fileSystemPath) || "stream/octet";
|
|
@@ -944,94 +977,94 @@ function startAxeServer(basedir, scripts, scriptContents) {
|
|
|
944
977
|
});
|
|
945
978
|
}
|
|
946
979
|
|
|
947
|
-
if (isDev) { // handle WebInspector JS maps etc.
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
}
|
|
980
|
+
// if (isDev) { // handle WebInspector JS maps etc.
|
|
981
|
+
|
|
982
|
+
// // const url = new URL(`https://fake.org${req.url}`);
|
|
983
|
+
// // const pathname = url.pathname;
|
|
984
|
+
// const pathname = decodeURI(u.pathname);
|
|
985
|
+
|
|
986
|
+
// const filePath = path.join(basedir, pathname);
|
|
987
|
+
// if (filePathsExpressStaticNotExist[filePath]) {
|
|
988
|
+
|
|
989
|
+
// const buff = Buffer.from(filePathsExpressStaticNotExist[filePath]);
|
|
990
|
+
// headers["Content-Length"] = buff.length.toString();
|
|
991
|
+
// headers["Content-Type"] = "plain/text";
|
|
992
|
+
// callback({
|
|
993
|
+
// data: bufferToStream(buff),
|
|
994
|
+
// headers,
|
|
995
|
+
// statusCode: 404,
|
|
996
|
+
// });
|
|
997
|
+
// return;
|
|
998
|
+
// }
|
|
999
|
+
// fsOriginal.exists(filePath, (exists) => {
|
|
1000
|
+
// if (exists) {
|
|
1001
|
+
// fsOriginal.readFile(filePath, undefined, (err, data) => {
|
|
1002
|
+
// if (err) {
|
|
1003
|
+
// if (LOG_DEBUG) {
|
|
1004
|
+
// console.log(`${ACE_LOG_PREFIX} HTTP FAIL fsOriginal.exists && ERR ${basedir} + ${req.url} => ${filePath}`, err);
|
|
1005
|
+
// }
|
|
1006
|
+
// filePathsExpressStaticNotExist[filePath] = err.toString();
|
|
1007
|
+
// const buff = Buffer.from(filePathsExpressStaticNotExist[filePath]);
|
|
1008
|
+
// headers["Content-Length"] = buff.length.toString();
|
|
1009
|
+
// headers["Content-Type"] = "plain/text";
|
|
1010
|
+
// callback({
|
|
1011
|
+
// data: bufferToStream(buff),
|
|
1012
|
+
// headers,
|
|
1013
|
+
// statusCode: 404,
|
|
1014
|
+
// });
|
|
1015
|
+
// } else {
|
|
1016
|
+
// // if (LOG_DEBUG) {
|
|
1017
|
+
// // console.log(`${ACE_LOG_PREFIX} HTTP OK fsOriginal.exists ${basedir} + ${req.url} => ${filePath}`);
|
|
1018
|
+
// // }
|
|
1019
|
+
// callback({
|
|
1020
|
+
// data: null,
|
|
1021
|
+
// headers,
|
|
1022
|
+
// statusCode: 500,
|
|
1023
|
+
// });
|
|
1024
|
+
// }
|
|
1025
|
+
// });
|
|
1026
|
+
// } else {
|
|
1027
|
+
// fs.exists(filePath, (exists) => {
|
|
1028
|
+
// if (exists) {
|
|
1029
|
+
// fs.readFile(filePath, undefined, (err, data) => {
|
|
1030
|
+
// if (err) {
|
|
1031
|
+
// if (LOG_DEBUG) {
|
|
1032
|
+
// console.log(`${ACE_LOG_PREFIX} HTTP FAIL !fsOriginal.exists && fs.exists && ERR ${basedir} + ${req.url} => ${filePath}`, err);
|
|
1033
|
+
// }
|
|
1034
|
+
// filePathsExpressStaticNotExist[filePath] = err.toString();
|
|
1035
|
+
// const buff = Buffer.from(filePathsExpressStaticNotExist[filePath]);
|
|
1036
|
+
// headers["Content-Length"] = buff.length.toString();
|
|
1037
|
+
// headers["Content-Type"] = "plain/text";
|
|
1038
|
+
// callback({
|
|
1039
|
+
// data: bufferToStream(buff),
|
|
1040
|
+
// headers,
|
|
1041
|
+
// statusCode: 404,
|
|
1042
|
+
// });
|
|
1043
|
+
// } else {
|
|
1044
|
+
// if (LOG_DEBUG) {
|
|
1045
|
+
// console.log(`${ACE_LOG_PREFIX} HTTP OK !fsOriginal.exists && fs.exists ${basedir} + ${req.url} => ${filePath}`);
|
|
1046
|
+
// }
|
|
1047
|
+
// callback({
|
|
1048
|
+
// data: null,
|
|
1049
|
+
// headers,
|
|
1050
|
+
// statusCode: 500,
|
|
1051
|
+
// });
|
|
1052
|
+
// }
|
|
1053
|
+
// });
|
|
1054
|
+
// } else {
|
|
1055
|
+
// if (LOG_DEBUG) {
|
|
1056
|
+
// console.log(`${ACE_LOG_PREFIX} HTTP FAIL !fsOriginal.exists && !fs.exists ${basedir} + ${req.url} => ${filePath}`);
|
|
1057
|
+
// }
|
|
1058
|
+
// callback({
|
|
1059
|
+
// data: null,
|
|
1060
|
+
// headers,
|
|
1061
|
+
// statusCode: 404,
|
|
1062
|
+
// });
|
|
1063
|
+
// }
|
|
1064
|
+
// });
|
|
1065
|
+
// }
|
|
1066
|
+
// });
|
|
1067
|
+
// }
|
|
1035
1068
|
};
|
|
1036
1069
|
|
|
1037
1070
|
// NO_HTTP_REMOVE
|