Skip to content

Commit 987d161

Browse files
committed
fix: handling wellknown and fix modified on bug
1 parent 26b7627 commit 987d161

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class CoCreateFileSystem {
4444
let pathname = valideUrl.pathname;
4545
if (pathname.endsWith('/')) {
4646
pathname += "index.html";
47-
} else {
47+
} else if (!pathname.startsWith('/.well-known/acme-challenge')) {
4848
let directory = pathname.split("/").slice(-1)[0];
4949
if (!directory.includes('.'))
5050
pathname += "/index.html";
@@ -107,8 +107,9 @@ class CoCreateFileSystem {
107107
}
108108

109109

110-
if (file.modified || file.created) {
111-
let modifiedOn = file.modified.on || file.created.on
110+
let modifiedOn = file.modified || file.created
111+
if (modifiedOn) {
112+
modifiedOn = modifiedOn.on
112113
if (modifiedOn instanceof Date)
113114
modifiedOn = modifiedOn.toISOString()
114115
res.setHeader('Last-Modified', modifiedOn);

0 commit comments

Comments
 (0)