@cocreate/file-server 1.15.1 → 1.15.2
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/index.js +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.15.2](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.15.1...v1.15.2) (2023-12-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* handling wellknown and fix modified on bug ([987d161](https://github.com/CoCreate-app/CoCreate-file-server/commit/987d1612797ea70c300c3f1472c11bf10b38efb2))
|
|
7
|
+
|
|
1
8
|
## [1.15.1](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.15.0...v1.15.1) (2023-12-18)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -44,7 +44,7 @@ class CoCreateFileSystem {
|
|
|
44
44
|
let pathname = valideUrl.pathname;
|
|
45
45
|
if (pathname.endsWith('/')) {
|
|
46
46
|
pathname += "index.html";
|
|
47
|
-
} else {
|
|
47
|
+
} else if (!pathname.startsWith('/.well-known/acme-challenge')) {
|
|
48
48
|
let directory = pathname.split("/").slice(-1)[0];
|
|
49
49
|
if (!directory.includes('.'))
|
|
50
50
|
pathname += "/index.html";
|
|
@@ -107,8 +107,9 @@ class CoCreateFileSystem {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
let modifiedOn = file.modified || file.created
|
|
111
|
+
if (modifiedOn) {
|
|
112
|
+
modifiedOn = modifiedOn.on
|
|
112
113
|
if (modifiedOn instanceof Date)
|
|
113
114
|
modifiedOn = modifiedOn.toISOString()
|
|
114
115
|
res.setHeader('Last-Modified', modifiedOn);
|