We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db5d058 commit 7c21109Copy full SHA for 7c21109
src/lib/run.js
@@ -335,10 +335,26 @@ async function run(
335
336
console.log(`Full PATH ${fullPath}`);
337
338
- if (fullPath.endsWith("/")) {
339
- fullPath += "index.html";
+ const urlFile = fsOperation(fullPath)
+
340
+ const stats = await urlFile.stat()
341
342
+ if(!stats.exists){
343
+ error(reqId)
344
+ return
345
}
346
347
+ if(!stats.isFile){
348
+ if (fullPath.endsWith("/")) {
349
+ fullPath += "index.html";
350
+ }else{
351
+ fullPath += "/index.html"
352
+ }
353
354
355
356
357
358
// Add back the query if present
359
url = query ? `${fullPath}?${query}` : fullPath;
360
0 commit comments