@midwayjs/security 4.0.0-beta.7 → 4.0.0-beta.9

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.
@@ -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'])
@@ -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-beta.7",
3
+ "version": "4.0.0-beta.9",
4
4
  "description": "Midway Security Component",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
@@ -30,12 +30,12 @@
30
30
  "xss": "1.0.15"
31
31
  },
32
32
  "devDependencies": {
33
- "@midwayjs/core": "^4.0.0-beta.7",
34
- "@midwayjs/express": "^4.0.0-beta.7",
35
- "@midwayjs/faas": "^4.0.0-beta.7",
36
- "@midwayjs/koa": "^4.0.0-beta.7",
37
- "@midwayjs/mock": "^4.0.0-beta.7",
38
- "@midwayjs/web": "^4.0.0-beta.7"
33
+ "@midwayjs/core": "^4.0.0-beta.9",
34
+ "@midwayjs/express": "^4.0.0-beta.9",
35
+ "@midwayjs/faas": "^4.0.0-beta.9",
36
+ "@midwayjs/koa": "^4.0.0-beta.9",
37
+ "@midwayjs/mock": "^4.0.0-beta.9",
38
+ "@midwayjs/web": "^4.0.0-beta.9"
39
39
  },
40
- "gitHead": "6a221788112b4d998b3958e0a275579f42816c59"
40
+ "gitHead": "771e83974ef9f3d78c296e4ee0c8c68db44f6b31"
41
41
  }