@midwayjs/security 3.2.2 → 3.3.0
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/configuration.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.SecurityConfiguration = void 0;
|
|
|
13
13
|
const decorator_1 = require("@midwayjs/decorator");
|
|
14
14
|
const DefaultConfig = require("./config/config.default");
|
|
15
15
|
const core_1 = require("@midwayjs/core");
|
|
16
|
-
const
|
|
16
|
+
const csrf_middleware_1 = require("./middleware/csrf.middleware");
|
|
17
17
|
const xframe_1 = require("./middleware/xframe");
|
|
18
18
|
const hsts_1 = require("./middleware/hsts");
|
|
19
19
|
const noopen_1 = require("./middleware/noopen");
|
|
@@ -29,7 +29,7 @@ let SecurityConfiguration = class SecurityConfiguration {
|
|
|
29
29
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
30
30
|
app.useMiddleware(helper_1.SecurityHelper);
|
|
31
31
|
if ((_a = this.security.csrf) === null || _a === void 0 ? void 0 : _a.enable) {
|
|
32
|
-
app.useMiddleware(
|
|
32
|
+
app.useMiddleware(csrf_middleware_1.CSRFMiddleware);
|
|
33
33
|
}
|
|
34
34
|
if ((_b = this.security.csp) === null || _b === void 0 ? void 0 : _b.enable) {
|
|
35
35
|
app.useMiddleware(csp_1.CSPMiddleware);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { SecurityConfiguration as Configuration } from './configuration';
|
|
2
2
|
export * from './interface';
|
|
3
|
-
export * from './middleware/csrf';
|
|
3
|
+
export * from './middleware/csrf.middleware';
|
|
4
4
|
export * from './middleware/xframe';
|
|
5
5
|
export * from './middleware/hsts';
|
|
6
6
|
export * from './middleware/noopen';
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ exports.Configuration = void 0;
|
|
|
18
18
|
var configuration_1 = require("./configuration");
|
|
19
19
|
Object.defineProperty(exports, "Configuration", { enumerable: true, get: function () { return configuration_1.SecurityConfiguration; } });
|
|
20
20
|
__exportStar(require("./interface"), exports);
|
|
21
|
-
__exportStar(require("./middleware/csrf"), exports);
|
|
21
|
+
__exportStar(require("./middleware/csrf.middleware"), exports);
|
|
22
22
|
__exportStar(require("./middleware/xframe"), exports);
|
|
23
23
|
__exportStar(require("./middleware/hsts"), exports);
|
|
24
24
|
__exportStar(require("./middleware/noopen"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/security",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Midway Security Component",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"xss": "^1.0.11"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@midwayjs/core": "^3.
|
|
33
|
+
"@midwayjs/core": "^3.3.0",
|
|
34
34
|
"@midwayjs/decorator": "^3.1.6",
|
|
35
|
-
"@midwayjs/express": "^3.
|
|
36
|
-
"@midwayjs/faas": "^3.
|
|
37
|
-
"@midwayjs/koa": "^3.
|
|
38
|
-
"@midwayjs/mock": "^3.
|
|
39
|
-
"@midwayjs/serverless-app": "^3.
|
|
40
|
-
"@midwayjs/web": "^3.
|
|
35
|
+
"@midwayjs/express": "^3.3.0",
|
|
36
|
+
"@midwayjs/faas": "^3.3.0",
|
|
37
|
+
"@midwayjs/koa": "^3.3.0",
|
|
38
|
+
"@midwayjs/mock": "^3.3.0",
|
|
39
|
+
"@midwayjs/serverless-app": "^3.3.0",
|
|
40
|
+
"@midwayjs/web": "^3.3.0"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "b12b41188879296f9863265baa5bbdb4158bddc5"
|
|
43
43
|
}
|