@cocreate/file-server 1.15.0 → 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 +14 -0
- package/package.json +1 -1
- package/src/index.js +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
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
|
+
|
|
8
|
+
## [1.15.1](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.15.0...v1.15.1) (2023-12-18)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* removed organizations map and url module ([a82bc56](https://github.com/CoCreate-app/CoCreate-file-server/commit/a82bc56a8e82f9fdabfdeb7592e140e4c3ad3aff))
|
|
14
|
+
|
|
1
15
|
# [1.15.0](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.14.1...v1.15.0) (2023-12-09)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -20,10 +20,6 @@
|
|
|
20
20
|
// you must obtain a commercial license from CoCreate LLC.
|
|
21
21
|
// For details, visit <https://cocreate.app/licenses/> or contact us at sales@cocreate.app.
|
|
22
22
|
|
|
23
|
-
const { URL } = require('url');
|
|
24
|
-
|
|
25
|
-
const organizations = new Map();
|
|
26
|
-
|
|
27
23
|
class CoCreateFileSystem {
|
|
28
24
|
constructor(render) {
|
|
29
25
|
this.render = render
|
|
@@ -48,7 +44,7 @@ class CoCreateFileSystem {
|
|
|
48
44
|
let pathname = valideUrl.pathname;
|
|
49
45
|
if (pathname.endsWith('/')) {
|
|
50
46
|
pathname += "index.html";
|
|
51
|
-
} else {
|
|
47
|
+
} else if (!pathname.startsWith('/.well-known/acme-challenge')) {
|
|
52
48
|
let directory = pathname.split("/").slice(-1)[0];
|
|
53
49
|
if (!directory.includes('.'))
|
|
54
50
|
pathname += "/index.html";
|
|
@@ -111,8 +107,9 @@ class CoCreateFileSystem {
|
|
|
111
107
|
}
|
|
112
108
|
|
|
113
109
|
|
|
114
|
-
|
|
115
|
-
|
|
110
|
+
let modifiedOn = file.modified || file.created
|
|
111
|
+
if (modifiedOn) {
|
|
112
|
+
modifiedOn = modifiedOn.on
|
|
116
113
|
if (modifiedOn instanceof Date)
|
|
117
114
|
modifiedOn = modifiedOn.toISOString()
|
|
118
115
|
res.setHeader('Last-Modified', modifiedOn);
|