@digest/express 4.14.6 → 4.14.8-next.1
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/dist/app.js +15 -1
- package/dist/routers/history.js +1 -1
- package/dist/routers/statics.js +1 -1
- package/package.json +2 -2
package/dist/app.js
CHANGED
|
@@ -44,13 +44,27 @@ const express_1 = __importDefault(require("express"));
|
|
|
44
44
|
const helmet_1 = __importStar(require("helmet"));
|
|
45
45
|
const app = (0, express_1.default)();
|
|
46
46
|
app.use((0, helmet_1.default)(), routers_1.default, (0, connect_slashes_1.default)(false));
|
|
47
|
-
if (
|
|
47
|
+
if (scripts_1.production) {
|
|
48
|
+
app.use((0, helmet_1.contentSecurityPolicy)({
|
|
49
|
+
directives: {
|
|
50
|
+
scriptSrc: [
|
|
51
|
+
'\'self\'',
|
|
52
|
+
'\'wasm-unsafe-eval\''
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
48
58
|
app.use((0, helmet_1.contentSecurityPolicy)({
|
|
49
59
|
directives: {
|
|
50
60
|
defaultSrc: [
|
|
51
61
|
'\'self\'',
|
|
52
62
|
'\'unsafe-inline\''
|
|
53
63
|
],
|
|
64
|
+
scriptSrc: [
|
|
65
|
+
'\'self\'',
|
|
66
|
+
'\'wasm-unsafe-eval\''
|
|
67
|
+
],
|
|
54
68
|
upgradeInsecureRequests: null
|
|
55
69
|
}
|
|
56
70
|
}));
|
package/dist/routers/history.js
CHANGED
|
@@ -20,7 +20,7 @@ const history = (baseHref = '/') => {
|
|
|
20
20
|
htmlAcceptHeaders: ACCEPT_HEADERS,
|
|
21
21
|
index: defaultIndex
|
|
22
22
|
});
|
|
23
|
-
const historyBase = '
|
|
23
|
+
const historyBase = '/{*expressHistoryPath}';
|
|
24
24
|
router.get(historyBase, historyMiddleware);
|
|
25
25
|
router.head(historyBase, historyMiddleware);
|
|
26
26
|
router.options(historyBase, historyMiddleware);
|
package/dist/routers/statics.js
CHANGED
|
@@ -45,7 +45,7 @@ const statics = (baseHref, staticPath, production = false, serveStaticOptions) =
|
|
|
45
45
|
strict: true
|
|
46
46
|
});
|
|
47
47
|
const options = Object.assign(Object.assign({}, defaultServeStaticOptions), serveStaticOptions);
|
|
48
|
-
const staticBase = '
|
|
48
|
+
const staticBase = '/{*expressStaticPath}';
|
|
49
49
|
const serveStatic = removeBaseHref(production ?
|
|
50
50
|
(0, express_static_gzip_1.default)(staticPath, {
|
|
51
51
|
enableBrotli: true,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@digest/express",
|
|
3
3
|
"title": "Express Digest",
|
|
4
4
|
"license": "LGPL-3.0-or-later",
|
|
5
|
-
"version": "4.14.
|
|
5
|
+
"version": "4.14.8-next.1",
|
|
6
6
|
"description": "Digested Express configurations",
|
|
7
7
|
"author": "wallzero @wallzeroblog (http://wallzero.com)",
|
|
8
8
|
"contributors": [
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"digest",
|
|
64
64
|
"express"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "2f4145c4391be317be01156076e642eeae4d4453"
|
|
67
67
|
}
|