@midwayjs/security 4.0.0-alpha.1 → 4.0.0-beta.10
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 +2 -0
- package/dist/middleware/base.js +3 -0
- package/package.json +10 -10
package/dist/configuration.js
CHANGED
|
@@ -21,6 +21,8 @@ const xssProtection_middleware_1 = require("./middleware/xssProtection.middlewar
|
|
|
21
21
|
const csp_middleware_1 = require("./middleware/csp.middleware");
|
|
22
22
|
const helper_1 = require("./middleware/helper");
|
|
23
23
|
let SecurityConfiguration = class SecurityConfiguration {
|
|
24
|
+
applicationManager;
|
|
25
|
+
security;
|
|
24
26
|
async onReady() {
|
|
25
27
|
this.applicationManager
|
|
26
28
|
.getApplications(['koa', 'faas', 'express', 'egg'])
|
package/dist/middleware/base.js
CHANGED
|
@@ -12,6 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.BaseMiddleware = void 0;
|
|
13
13
|
const core_1 = require("@midwayjs/core");
|
|
14
14
|
class BaseMiddleware {
|
|
15
|
+
security;
|
|
16
|
+
match;
|
|
17
|
+
ignore;
|
|
15
18
|
async init() {
|
|
16
19
|
// 动态合并一些规则
|
|
17
20
|
if (this.security?.[this.securityName()]?.match) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/security",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-beta.10",
|
|
4
4
|
"description": "Midway Security Component",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -18,24 +18,24 @@
|
|
|
18
18
|
"index.d.ts"
|
|
19
19
|
],
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": ">=
|
|
21
|
+
"node": ">=20"
|
|
22
22
|
},
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"csrf": "3.1.0",
|
|
26
26
|
"escape-html": "1.0.3",
|
|
27
|
-
"nanoid": "3.3.
|
|
27
|
+
"nanoid": "3.3.11",
|
|
28
28
|
"picomatch": "2.3.1",
|
|
29
29
|
"platform": "1.3.6",
|
|
30
30
|
"xss": "1.0.15"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@midwayjs/core": "^4.0.0-
|
|
34
|
-
"@midwayjs/express": "^4.0.0-
|
|
35
|
-
"@midwayjs/faas": "^4.0.0-
|
|
36
|
-
"@midwayjs/koa": "^4.0.0-
|
|
37
|
-
"@midwayjs/mock": "^4.0.0-
|
|
38
|
-
"@midwayjs/web": "^4.0.0-
|
|
33
|
+
"@midwayjs/core": "^4.0.0-beta.10",
|
|
34
|
+
"@midwayjs/express": "^4.0.0-beta.10",
|
|
35
|
+
"@midwayjs/faas": "^4.0.0-beta.10",
|
|
36
|
+
"@midwayjs/koa": "^4.0.0-beta.10",
|
|
37
|
+
"@midwayjs/mock": "^4.0.0-beta.10",
|
|
38
|
+
"@midwayjs/web": "^4.0.0-beta.10"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "1b1856629913703f67304155aaf611ec936a81ac"
|
|
41
41
|
}
|